summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2015-02-06 02:50:39 -0800
committerJulien Gilli <julien.gilli@joyent.com>2015-02-06 11:55:44 -0800
commit087a7519cea9b8aed23f4c03111da724cf20a94f (patch)
tree6635bb0b924574da0ddc4059cd977b3e4db4c884
parent02566a77c9cff462086f123104d25115dbe2535d (diff)
downloadnode-new-087a7519cea9b8aed23f4c03111da724cf20a94f.tar.gz
deps: upgrade npm to 2.5.1
Fixes #9126. Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com> Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
-rw-r--r--deps/npm/.mailmap31
-rw-r--r--deps/npm/AUTHORS291
-rw-r--r--deps/npm/CHANGELOG.md127
-rw-r--r--deps/npm/Makefile13
-rw-r--r--deps/npm/doc/cli/npm-access.md63
-rw-r--r--deps/npm/doc/cli/npm-dist-tag.md72
-rw-r--r--deps/npm/doc/cli/npm-publish.md11
-rw-r--r--deps/npm/doc/cli/npm-shrinkwrap.md4
-rw-r--r--deps/npm/doc/cli/npm-tag.md2
-rw-r--r--deps/npm/doc/files/package.json.md2
-rw-r--r--deps/npm/doc/misc/npm-config.md16
-rw-r--r--deps/npm/doc/misc/npm-index.md8
-rw-r--r--deps/npm/html/doc/README.html4
-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.html2
-rw-r--r--deps/npm/html/doc/cli/npm-docs.html2
-rw-r--r--deps/npm/html/doc/cli/npm-edit.html2
-rw-r--r--deps/npm/html/doc/cli/npm-explore.html2
-rw-r--r--deps/npm/html/doc/cli/npm-help-search.html2
-rw-r--r--deps/npm/html/doc/cli/npm-help.html2
-rw-r--r--deps/npm/html/doc/cli/npm-init.html2
-rw-r--r--deps/npm/html/doc/cli/npm-install.html2
-rw-r--r--deps/npm/html/doc/cli/npm-link.html2
-rw-r--r--deps/npm/html/doc/cli/npm-ls.html4
-rw-r--r--deps/npm/html/doc/cli/npm-outdated.html2
-rw-r--r--deps/npm/html/doc/cli/npm-owner.html2
-rw-r--r--deps/npm/html/doc/cli/npm-pack.html2
-rw-r--r--deps/npm/html/doc/cli/npm-prefix.html2
-rw-r--r--deps/npm/html/doc/cli/npm-prune.html2
-rw-r--r--deps/npm/html/doc/cli/npm-publish.html13
-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.html6
-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.html3
-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.html4
-rw-r--r--deps/npm/html/doc/files/npmrc.html2
-rw-r--r--deps/npm/html/doc/files/package.json.html4
-rw-r--r--deps/npm/html/doc/index.html6
-rw-r--r--deps/npm/html/doc/misc/npm-coding-style.html2
-rw-r--r--deps/npm/html/doc/misc/npm-config.html17
-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.html6
-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.html2
-rw-r--r--deps/npm/html/partial/doc/api/npm.html2
-rw-r--r--deps/npm/html/partial/doc/cli/npm-ls.html2
-rw-r--r--deps/npm/html/partial/doc/cli/npm-publish.html11
-rw-r--r--deps/npm/html/partial/doc/cli/npm-shrinkwrap.html4
-rw-r--r--deps/npm/html/partial/doc/cli/npm-tag.html1
-rw-r--r--deps/npm/html/partial/doc/cli/npm.html8
-rw-r--r--deps/npm/html/partial/doc/files/npm-json.html2
-rw-r--r--deps/npm/html/partial/doc/files/package.json.html2
-rw-r--r--deps/npm/html/partial/doc/index.html4
-rw-r--r--deps/npm/html/partial/doc/misc/npm-config.html15
-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/html/partial/doc/misc/npm-index.html4
-rw-r--r--deps/npm/lib/access.js123
-rw-r--r--deps/npm/lib/cache/caching-client.js11
-rw-r--r--deps/npm/lib/config/defaults.js13
-rw-r--r--deps/npm/lib/dist-tag.js151
-rw-r--r--deps/npm/lib/npm.js3
-rw-r--r--deps/npm/lib/outdated.js69
-rw-r--r--deps/npm/lib/owner.js10
-rw-r--r--deps/npm/lib/publish.js11
-rw-r--r--deps/npm/lib/tag.js3
-rw-r--r--deps/npm/lib/unbuild.js6
-rw-r--r--deps/npm/lib/utils/read-local-package.js12
-rw-r--r--deps/npm/man/man1/npm-README.12
-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.12
-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.12
-rw-r--r--deps/npm/man/man1/npm-link.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.114
-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.16
-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.14
-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.54
-rw-r--r--deps/npm/man/man5/npmrc.52
-rw-r--r--deps/npm/man/man5/package.json.54
-rw-r--r--deps/npm/man/man7/npm-coding-style.72
-rw-r--r--deps/npm/man/man7/npm-config.723
-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.78
-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/columnify/Makefile9
-rw-r--r--deps/npm/node_modules/columnify/Readme.md201
-rw-r--r--deps/npm/node_modules/columnify/columnify.js301
-rw-r--r--deps/npm/node_modules/columnify/index.js213
-rwxr-xr-xdeps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js10
-rw-r--r--deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json19
-rw-r--r--deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md12
-rw-r--r--deps/npm/node_modules/columnify/node_modules/wcwidth/package.json3
-rw-r--r--deps/npm/node_modules/columnify/package.json28
-rw-r--r--deps/npm/node_modules/fstream/lib/writer.js2
-rw-r--r--deps/npm/node_modules/fstream/package.json10
-rw-r--r--deps/npm/node_modules/init-package-json/default-input.js2
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/promzard/package.json3
-rw-r--r--deps/npm/node_modules/init-package-json/package.json34
-rw-r--r--deps/npm/node_modules/init-package-json/test/npm-defaults.js2
-rw-r--r--deps/npm/node_modules/npm-registry-client/README.md77
-rw-r--r--deps/npm/node_modules/npm-registry-client/index.js35
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/access.js30
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/dist-tags/add.js43
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js37
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/dist-tags/rm.js38
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/dist-tags/set.js39
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/dist-tags/update.js39
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/fetch.js3
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/initialize.js58
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/publish.js12
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/request.js6
-rw-r--r--deps/npm/node_modules/npm-registry-client/lib/tag.js5
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/LICENSE15
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/README.md101
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/.npmignore3
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/.travis.yml5
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/README.md82
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/index.js208
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/package.json55
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/basic.js9
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/bitbucket.js24
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/gist.js40
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/github.js42
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/gitlab.js25
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/lib/standard-tests.js28
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/npa.js181
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/package.json63
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/basic.js168
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/bitbucket.js82
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/github.js106
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/gitlab.js82
-rw-r--r--deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/windows.js41
-rw-r--r--deps/npm/node_modules/npm-registry-client/package.json13
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/access.js96
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/dist-tags-add.js141
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/dist-tags-fetch.js98
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/dist-tags-rm.js117
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/dist-tags-set.js121
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/dist-tags-update.js121
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/initialize.js74
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/publish-again-scoped.js1
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/publish-again.js1
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/publish-failed-no-message.js2
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/publish-scoped-auth-token.js1
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/publish-scoped.js1
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/publish.js26
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/tag.js6
-rw-r--r--deps/npm/node_modules/npm-registry-client/test/whoami.js7
-rw-r--r--deps/npm/node_modules/request/.npmignore1
-rw-r--r--deps/npm/node_modules/request/.travis.yml1
-rw-r--r--deps/npm/node_modules/request/CHANGELOG.md38
-rw-r--r--deps/npm/node_modules/request/README.md111
-rwxr-xr-xdeps/npm/node_modules/request/index.js12
-rw-r--r--deps/npm/node_modules/request/lib/auth.js133
-rw-r--r--deps/npm/node_modules/request/lib/debug.js11
-rw-r--r--deps/npm/node_modules/request/lib/getProxyFromURI.js79
-rw-r--r--deps/npm/node_modules/request/lib/oauth.js121
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/README.md7
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/bl.js2
-rw-r--r--deps/npm/node_modules/request/node_modules/bl/package.json17
-rw-r--r--deps/npm/node_modules/request/node_modules/caseless/index.js2
-rw-r--r--deps/npm/node_modules/request/node_modules/caseless/package.json26
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/README.md99
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db/LICENSE22
-rw-r--r--deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/package.json80
-rw-r--r--deps/npm/node_modules/request/node_modules/hawk/.npmignore38
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/.travis.yml10
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/LICENSE14
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/Makefile10
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/README.md18
-rw-r--r--deps/npm/node_modules/request/node_modules/hawk/bower.json24
-rw-r--r--deps/npm/node_modules/request/node_modules/hawk/component.json19
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/lib/browser.js238
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/lib/client.js22
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/lib/crypto.js12
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/lib/server.js41
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/lib/utils.js49
-rw-r--r--deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/CONTRIBUTING.md1
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE14
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/boom/Makefile12
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md575
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js241
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json53
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js653
-rw-r--r--deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore36
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml10
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE14
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile10
-rw-r--r--deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md10
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js2
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json38
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js15
-rw-r--r--deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore36
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml10
-rw-r--r--deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/CONTRIBUTING.md1
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE64
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile18
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md979
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/index.js2
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js264
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js1512
-rw-r--r--[-rwxr-xr-x]deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json61
-rwxr-xr-x[-rw-r--r--]deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js174
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js3325
-rw-r--r--deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/ignore.txt0
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js2
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js2
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js2
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE14
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile10
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js25
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json36
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js90
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/package.json41
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/test/browser.js872
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/test/client.js283
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/test/crypto.js12
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/test/index.js130
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/test/message.js75
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/test/readme.js14
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/test/server.js499
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/test/uri.js222
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/test/utils.js14
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/README.md86
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/http_signing.md26
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/lib/index.js1
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/lib/signer.js1
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/lib/util.js59
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json30
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js71
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json41
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore1
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG9
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json21
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json13
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json13
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json104
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json19
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js39
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js14
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js14
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js17
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js18
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js15
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json14
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js767
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js753
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js638
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js101
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js53
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js92
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js451
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js81
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js95
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js156
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js50
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js44
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js42
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js45
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js28
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js128
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js28
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js31
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/package.json64
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/.jshintrc59
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/.npmignore1
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/.travis.yml12
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/LICENSE39
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/README.md66
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/isstream.js27
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/package.json58
-rw-r--r--deps/npm/node_modules/request/node_modules/isstream/test.js168
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/.npmignore14
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/.travis.yml12
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md (renamed from deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/HISTORY.md)27
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/Makefile9
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/README.md66
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/SOURCES.md17
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/component.json16
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/index.js (renamed from deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/index.js)0
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/lib/custom.json27
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/lib/index.js75
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/lib/mime.json3317
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/lib/node.json55
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md160
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/LICENSE (renamed from deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/LICENSE)0
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/README.md (renamed from deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db/README.md)31
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json (renamed from deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db/db.json)258
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/index.js (renamed from deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db/index.js)0
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json (renamed from deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db/package.json)60
-rw-r--r--deps/npm/node_modules/request/node_modules/mime-types/package.json65
-rw-r--r--deps/npm/node_modules/request/node_modules/oauth-sign/index.js17
-rw-r--r--deps/npm/node_modules/request/node_modules/oauth-sign/package.json26
-rw-r--r--deps/npm/node_modules/request/node_modules/oauth-sign/test.js13
-rw-r--r--deps/npm/node_modules/request/package.json37
-rw-r--r--deps/npm/node_modules/request/request.js429
-rw-r--r--deps/npm/package.json20
-rwxr-xr-xdeps/npm/scripts/update-authors.sh20
-rw-r--r--deps/npm/test/common-tap.js2
-rw-r--r--deps/npm/test/disabled/outdated-depth-integer.js4
-rw-r--r--deps/npm/test/run.js4
-rw-r--r--deps/npm/test/tap/404-parent.js9
-rw-r--r--deps/npm/test/tap/access.js91
-rw-r--r--deps/npm/test/tap/adduser-always-auth.js6
-rw-r--r--deps/npm/test/tap/adduser-legacy-auth.js2
-rw-r--r--deps/npm/test/tap/bugs.js12
-rw-r--r--deps/npm/test/tap/cache-shasum-fork.js2
-rw-r--r--deps/npm/test/tap/cache-shasum.js2
-rw-r--r--deps/npm/test/tap/circular-dep.js2
-rw-r--r--deps/npm/test/tap/dedupe.js2
-rw-r--r--deps/npm/test/tap/dist-tag.js195
-rw-r--r--deps/npm/test/tap/false_name.js2
-rw-r--r--deps/npm/test/tap/get.js11
-rw-r--r--deps/npm/test/tap/ignore-shrinkwrap.js4
-rw-r--r--deps/npm/test/tap/install-cli-unicode.js4
-rw-r--r--deps/npm/test/tap/install-save-exact.js4
-rw-r--r--deps/npm/test/tap/install-save-prefix.js8
-rw-r--r--deps/npm/test/tap/install-with-dev-dep-duplicate.js2
-rw-r--r--deps/npm/test/tap/ls-depth-cli.js2
-rw-r--r--deps/npm/test/tap/ls-depth-unmet.js2
-rw-r--r--deps/npm/test/tap/ls-l-depth-0.js2
-rw-r--r--deps/npm/test/tap/noargs-install-config-save.js4
-rw-r--r--deps/npm/test/tap/outdated-color.js2
-rw-r--r--deps/npm/test/tap/outdated-depth.js2
-rw-r--r--deps/npm/test/tap/outdated-include-devdependencies.js2
-rw-r--r--deps/npm/test/tap/outdated-json.js2
-rw-r--r--deps/npm/test/tap/outdated-long.js70
-rw-r--r--deps/npm/test/tap/outdated-new-versions.js2
-rw-r--r--deps/npm/test/tap/outdated-notarget.js2
-rw-r--r--deps/npm/test/tap/outdated-private.js2
-rw-r--r--deps/npm/test/tap/outdated.js2
-rw-r--r--deps/npm/test/tap/owner.js4
-rw-r--r--deps/npm/test/tap/peer-deps-invalid.js11
-rw-r--r--deps/npm/test/tap/peer-deps-toplevel.js2
-rw-r--r--deps/npm/test/tap/peer-deps-without-package-json.js23
-rw-r--r--deps/npm/test/tap/peer-deps.js2
-rw-r--r--deps/npm/test/tap/prune.js2
-rw-r--r--deps/npm/test/tap/publish-access-scoped.js84
-rw-r--r--deps/npm/test/tap/publish-access-unscoped-restricted-fails.js70
-rw-r--r--deps/npm/test/tap/publish-access-unscoped.js84
-rw-r--r--deps/npm/test/tap/repo.js12
-rw-r--r--deps/npm/test/tap/search.js6
-rw-r--r--deps/npm/test/tap/shrinkwrap-dev-dependency.js2
-rw-r--r--deps/npm/test/tap/shrinkwrap-empty-deps.js2
-rw-r--r--deps/npm/test/tap/shrinkwrap-scoped-auth.js2
-rw-r--r--deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js2
-rw-r--r--deps/npm/test/tap/sorted-package-json.js2
-rw-r--r--deps/npm/test/tap/uninstall-package.js2
-rw-r--r--deps/npm/test/tap/update-index.js19
-rw-r--r--deps/npm/test/tap/update-save.js5
-rw-r--r--deps/npm/test/tap/url-dependencies.js2
-rw-r--r--deps/npm/test/tap/view.js25
514 files changed, 14685 insertions, 12460 deletions
diff --git a/deps/npm/.mailmap b/deps/npm/.mailmap
new file mode 100644
index 0000000000..c90d447486
--- /dev/null
+++ b/deps/npm/.mailmap
@@ -0,0 +1,31 @@
+Arlo Breault <arlolra@gmail.com>
+Alex K. Wolfe <alexkwolfe@gmail.com>
+Andrew Lunny <alunny@gmail.com>
+Benjamin Coe <bencoe@gmail.com>
+Brian White <mscdex@mscdex.net> <mscdex@gmail.com>
+Charlie Robbins <charlie.robbins@gmail.com>
+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@hattiesburgclinic.com>
+Faiq Raza <faiqrazarizvi@gmail.com>
+Forbes Lindesay <forbes@lindesay.co.uk>
+Forrest L. Norvell <forrest@npmjs.com> <ogd@aoaioxxysz.net>
+Gabriel Barros <descartavel1@gmail.com>
+Geoff Flarity <geoff.flarity@gmail.com> <gflarity@raptvm-x02.(none)>
+Isaac Z. Schlueter <i@izs.me> <i@foohack.com>
+Jake Verbaten <raynos2@gmail.com>
+James Sanders <jimmyjazz14@gmail.com>
+Jason Smith <jhs@iriscouch.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>
+Nicolas Morel <marsup@gmail.com>
+Olivier Melcher <olivier.melcher@gmail.com>
+Visnu Pitiyanuvath <visnupx@gmail.com>
+Will Elwood <w.elwood08@gmail.com>
+Zeke Sikelianos <zeke@sikelianos.com> \ No newline at end of file
diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS
index 3c0c0b0ba8..7155393ab4 100644
--- a/deps/npm/AUTHORS
+++ b/deps/npm/AUTHORS
@@ -1,158 +1,243 @@
# Authors sorted by whether or not they're me
-Isaac Z. Schlueter <i@izs.me>
-Steve Steiner <ssteinerX@gmail.com>
-Mikeal Rogers <mikeal.rogers@gmail.com>
-Aaron Blohowiak <aaron.blohowiak@gmail.com>
-Martyn Smith <martyn@dollyfish.net.nz>
-Mathias Pettersson <mape@mape.me>
-Brian Hammond <brian@fictorial.com>
-Charlie Robbins <charlie.robbins@gmail.com>
-Francisco Treacy <francisco.treacy@gmail.com>
-Cliffano Subagio <cliffano@gmail.com>
-Christian Eager <christian.eager@nokia.com>
-Dav Glass <davglass@gmail.com>
-Alex K. Wolfe <alexkwolfe@gmail.com>
-James Sanders <jimmyjazz14@gmail.com>
-Reid Burke <me@reidburke.com>
-Arlo Breault <arlolra@gmail.com>
-Timo Derstappen <teemow@gmail.com>
-Bradley Meck <bradley.meck@gmail.com>
-Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
-Ben Noordhuis <info@bnoordhuis.nl>
-Tor Valamo <tor.valamo@gmail.com>
-Whyme.Lyu <5longluna@gmail.com>
-Olivier Melcher <olivier.melcher@gmail.com>
-Tomaž Muraus <kami@k5-storitve.net>
Evan Meagher <evan.meagher@gmail.com>
Orlando Vazquez <ovazquez@gmail.com>
+Kai Chen <kaichenxyz@gmail.com>
George Miroshnykov <gmiroshnykov@lohika.com>
Geoff Flarity <geoff.flarity@gmail.com>
+Max Goodman <c@chromakode.com>
Pete Kruckenberg <pete@kruckenberg.com>
Laurie Harper <laurie@holoweb.net>
+Neil Gentleman <ngentleman@gmail.com>
+Kris Kowal <kris.kowal@cixar.com>
+Alex Gorbatchev <alex.gorbatchev@gmail.com>
+Shawn Wildermuth <shawn@wildermuth.com>
+Wesley de Souza <wesleywex@gmail.com>
+Patrick Pfeiffer <patrick@buzzle.at>
+yoyoyogi <yogesh.k@gmail.com>
+Paul Miller <paul@paulmillr.com>
+Jérémy Lal <kapouer@melix.org>
+J. Tangelder <j.tangelder@gmail.com>
+seebees <seebees@gmail.com>
+Anders Janmyr <anders@janmyr.com>
+Jean Lauliac <jean@lauliac.com>
+Carl Lange <carl@flax.ie>
+Chris Meyers <chris.meyers.fsu@gmail.com>
+Andrey Kislyuk <kislyuk@gmail.com>
+Jan Lehnardt <jan@apache.org>
+Ludwig Magnusson <ludwig@mediatool.com>
+Thorsten Lorenz <thlorenz@gmx.de>
+Stuart P. Bentley <stuart@testtrack4.com>
+wmertens <Wout.Mertens@gmail.com>
+Johan Sköld <johan@skold.cc>
+Nick Santos <nick@medium.com>
+Stuart Knightley <stuart@stuartk.com>
+Terin Stock <terinjokes@gmail.com>
+Niggler <nirk.niggler@gmail.com>
+Faiq Raza <faiqrazarizvi@gmail.com>
+Paolo Fragomeni <paolo@async.ly>
+Thomas Torp <thomas@erupt.no>
+Jaakko Manninen <jaakko@rocketpack.fi>
+Sam Mikes <smikes@cubane.com>
+Luke Arduini <luke.arduini@gmail.com>
+Larz Conwell <larz@larz-laptop.(none)>
+Marcel Klehr <mklehr@gmx.net>
+Robert Kowalski <rok@kowalski.gd>
Chris Wong <chris@chriswongstudio.com>
-Max Goodman <c@chromacode.com>
+Forbes Lindesay <forbes@lindesay.co.uk>
Scott Bronson <brons_github@rinspin.com>
+Vaz Allen <vaz@tryptid.com>
Federico Romero <federomero@gmail.com>
+Jake Verbaten <raynos2@gmail.com>
Visnu Pitiyanuvath <visnupx@gmail.com>
+Schabse Laks <Dev@SLaks.net>
Irakli Gozalishvili <rfobic@gmail.com>
+Florian Margaine <florian@margaine.com>
Mark Cahill <mark@tiemonster.info>
Zearin <zearin@gonk.net>
Iain Sproat <iainsproat@gmail.com>
Trent Mick <trentm@gmail.com>
Felix Geisendörfer <felix@debuggable.com>
-Conny Brunnkvist <cbrunnkvist@gmail.com>
+Julian Gruber <julian@juliangruber.com>
+Benjamin Coe <bencoe@gmail.com>
+Alex Ford <Alex.Ford@CodeTunnel.com>
+Matt Hickford <matt.hickford@gmail.com>
+Sean McGivern <sean.mcgivern@rightscale.com>
+C J Silverio <ceejceej@gmail.com>
+Mat Tyndall <mat.tyndall@gmail.com>
+Robin Tweedie <robin@songkick.com>
+Tauren Mills <tauren@sportzing.com>
+Miroslav Bajtoš <miroslav@strongloop.com>
+Isaac Z. Schlueter <i@izs.me>
+Ron Martinez <ramartin.net@gmail.com>
+David Glasser <glasser@davidglasser.net>
+Steve Steiner <ssteinerX@gmail.com>
+Kazuhito Hokamura <k.hokamura@gmail.com>
+Gianluca Casati <casati_gianluca@yahoo.it>
+Mikeal Rogers <mikeal.rogers@gmail.com>
+Tristan Davies <github@tristan.io>
+Aaron Blohowiak <aaron.blohowiak@gmail.com>
+David Volm <david@volminator.com>
+Martyn Smith <martyn@dollyfish.net.nz>
+Lin Clark <lin.w.clark@gmail.com>
+Charlie Robbins <charlie.robbins@gmail.com>
+Ben Page <bpage@dewalch.com>
+Francisco Treacy <francisco.treacy@gmail.com>
+Jeff Jo <jeffjo@squareup.com>
+Johan Nordberg <its@johan-nordberg.com>
+Cliffano Subagio <cliffano@gmail.com>
+martinvd <martinvdpub@gmail.com>
+Ian Babrou <ibobrik@gmail.com>
+Christian Eager <christian.eager@nokia.com>
+Di Wu <dwu@palantir.com>
+Mathias Bynens <mathias@qiwi.be>
+Matt McClure <matt.mcclure@mapmyfitness.com>
+Jameson Little <t.jameson.little@gmail.com>
+Matt Lunn <matt@mattlunn.me.uk>
+Conny Brunnkvist <conny@fuchsia.se>
+Alexey Kreschuk <akrsch@gmail.com>
Will Elwood <w.elwood08@gmail.com>
+elisee <elisee@sparklin.org>
+Dean Landolt <dean@deanlandolt.com>
+Robert Gieseke <robert.gieseke@gmail.com>
Oleg Efimov <efimovov@gmail.com>
+François Frisch <francoisfrisch@gmail.com>
Martin Cooper <mfncooper@gmail.com>
-Jameson Little <t.jameson.little@gmail.com>
+Jann Horn <jannhorn@googlemail.com>
cspotcode <cspotcode@gmail.com>
-Maciej Małecki <maciej.malecki@notimplemented.org>
+Maciej Małecki <me@mmalecki.com>
Stephen Sugden <glurgle@gmail.com>
+Forrest L Norvell <forrest@npmjs.com>
+Karsten Tinnefeld <k.tinnefeld@googlemail.com>
+Bryan Burgers <bryan@burgers.io>
+David Beitey <david@davidjb.com>
+Evan You <yyou@google.com>
+Zach Pomerantz <zmp@umich.edu>
+Mark J. Titorenko <nospam-github.com@titorenko.net>
+Chris Williams <cwilliams88@gmail.com>
+Oddur Sigurdsson <oddurs@gmail.com>
+sudodoki <smd.deluzion@gmail.com>
+Eric Mill <eric@konklone.com>
+Mick Thompson <dthompson@gmail.com>
+Gabriel Barros <descartavel1@gmail.com>
+Felix Rabe <felix@rabe.io>
+KevinSheedy <kevinsheedy@gmail.com>
+Aleksey Smolenchuk <aleksey@uber.com>
+Ed Morley <emorley@mozilla.com>
+Blaine Bublitz <blaine@iceddev.com>
+Andrey Fedorov <anfedorov@gmail.com>
+Trevor Burnham <tburnham@hubspot.com>
+Daijiro Wachi <daijiro.wachi@gmail.com>
+Alan Shaw <alan@freestyle-developments.co.uk>
+TJ Holowaychuk <tj@vision-media.ca>
+Luke Arduini <luke.arduini@me.com>
+Nicholas Kinsey <pyro@feisty.io>
+Michael Budde <mbudde@gmail.com>
+Paulo Cesar <pauloc062@gmail.com>
+Jason Smith <jhs@iriscouch.com>
+Elan Shanker <elan.shanker@gmail.com>
Gautham Pai <buzypi@gmail.com>
+Jon Spencer <jon@jonspencer.ca>
David Trejo <david.daniel.trejo@gmail.com>
+Jason Diamond <jason@diamond.name>
Paul Vorbach <paul@vorb.de>
+Maximilian Antoni <mail@maxantoni.de>
George Ornbo <george@shapeshed.com>
Tim Oxley <secoif@gmail.com>
Tyler Green <tyler.green2@gmail.com>
+Dave Pacheco <dap@joyent.com>
atomizer <danila.gerasimov@gmail.com>
+Michael Hayes <michael@hayes.io>
+Chris Dickinson <christopher.s.dickinson@gmail.com>
+Bradley Meck <bradley.meck@gmail.com>
+GeJ <geraud@gcu.info>
+Andrew Terris <atterris@gmail.com>
+Michael Nisi <michael.nisi@gmail.com>
+Luc Thevenard <lucthevenard@gmail.com>
+fengmk2 <fengmk2@gmail.com>
+Aria Stewart <aredridel@nbtsc.org>
+Adam Meadows <adam.meadows@gmail.com>
+Charlie Rudolph <charles.w.rudolph@gmail.com>
+Chulki Lee <chulki.lee@gmail.com>
+不四 <busi.hyy@taobao.com>
+Thom Blake <tblake@brightroll.com>
+Jess Martin <jessmartin@gmail.com>
+Spain Train <michael.spainhower@opower.com>
+Alex Rodionov <p0deje@gmail.com>
+Matt Colyer <matt@colyer.name>
Rod Vagg <rod@vagg.org>
+Evan You <yyx990803@gmail.com>
Christian Howe <coderarity@gmail.com>
+bitspill <bitspill+github@bitspill.net>
Andrew Lunny <alunny@gmail.com>
+Gabriel Falkenberg <gabriel.falkenberg@gmail.com>
Henrik Hodne <dvyjones@binaryhex.com>
+Alexej Yaroshevich <alex@qfox.ru>
Adam Blackburn <regality@gmail.com>
+Quim Calpe <quim@kalpe.com>
Kris Windham <kriswindham@gmail.com>
Jens Grunert <jens.grunert@gmail.com>
Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
-Dalmais Maxence <github@maxired.fr>
+Dalmais Maxence <root@ip-10-195-202-5.ec2.internal>
Marcus Ekwall <marcus.ekwall@gmail.com>
+Steve Mason <stevem@brandwatch.com>
+Wil Moore III <wil.moore@wilmoore.com>
+Sergey Belov <peimei@ya.ru>
+Tom Huang <hzlhu.dargon@gmail.com>
+CamilleM <camille.moulin@alterway.fr>
Aaron Stacy <aaron.r.stacy@gmail.com>
+Sébastien Santoro <dereckson@espace-win.org>
Phillip Howell <phowell@cothm.org>
+Evan Lucas <evan@btc.com>
Domenic Denicola <domenic@domenicdenicola.com>
+Quinn Slack <qslack@qslack.com>
James Halliday <mail@substack.net>
+Alex Kocharin <alex@kocharin.ru>
Jeremy Cantrell <jmcantrell@gmail.com>
+Evan Lucas <evan.lucas@hattiesburgclinic.com>
+Trent Mick <trent.mick@joyent.com>
Ribettes <patlogan29@gmail.com>
-Einar Otto Stangvik <einaros@gmail.com>
Don Park <donpark@docuverse.com>
+Einar Otto Stangvik <einaros@gmail.com>
Kei Son <heyacct@gmail.com>
+Dav Glass <davglass@gmail.com>
+Alex K. Wolfe <alexkwolfe@gmail.com>
+James Sanders <jimmyjazz14@gmail.com>
+Reid Burke <me@reidburke.com>
+Arlo Breault <arlolra@gmail.com>
+Timo Derstappen <teemow@gmail.com>
+Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
+Ben Noordhuis <info@bnoordhuis.nl>
+Tor Valamo <tor.valamo@gmail.com>
+Whyme.Lyu <5longluna@gmail.com>
+Daniel Santiago <daniel.santiago@highlevelwebs.com>
+Denis Gladkikh <outcoldman@gmail.com>
+Andrew Horton <andrew.j.horton@gmail.com>
+Zeke Sikelianos <zeke@sikelianos.com>
+Dylan Greene <dylang@gmail.com>
Nicolas Morel <marsup@gmail.com>
+Franck Cuny <franck.cuny@gmail.com>
Mark Dube <markisdee@gmail.com>
+dead_horse <dead_horse@qq.com>
+Yeonghoon Park <sola92@gmail.com>
Nathan Rajlich <nathan@tootallnate.net>
+Kenan Yildirim <kenan@kenany.me>
+Rafael de Oleza <rafa@spotify.com>
Maxim Bogushevich <boga1@mail.ru>
-Justin Beckwith <justbe@microsoft.com>
+Laurie Voss <git@seldo.com>
+Mikola Lysenko <mikolalysenko@gmail.com>
Meaglin <Meaglin.wasabi@gmail.com>
+Rebecca Turner <turner@mikomi.org>
+Yazhong Liu <yorkiefixer@gmail.com>
Ben Evans <ben@bensbit.co.uk>
+Hunter Loftis <hunter@hunterloftis.com>
Nathan Zadoks <nathan@nathan7.eu>
-Brian White <mscdex@gmail.com>
+Peter Richardson <github@zoomy.net>
+Brian White <mscdex@mscdex.net>
+Jussi Kalliokoski <jussi.kalliokoski@gmail.com>
Jed Schmidt <tr@nslator.jp>
+Filip Weiss <me@fiws.net>
Ian Livingstone <ianl@cs.dal.ca>
-Patrick Pfeiffer <patrick@buzzle.at>
-Paul Miller <paul@paulmillr.com>
-seebees <seebees@gmail.com>
-Carl Lange <carl@flax.ie>
-Jan Lehnardt <jan@apache.org>
-Alexey Kreschuk <akrsch@gmail.com>
-Di Wu <dwu@palantir.com>
-Florian Margaine <florian@margaine.com>
-Forbes Lindesay <forbes@lindesay.co.uk>
-Ian Babrou <ibobrik@gmail.com>
-Jaakko Manninen <jaakko@rocketpack.fi>
-Johan Nordberg <its@johan-nordberg.com>
-Johan Sköld <johan@skold.cc>
-Larz Conwell <larz@larz-laptop.(none)>
-Luke Arduini <luke.arduini@gmail.com>
-Marcel Klehr <mklehr@gmx.net>
-Mathias Bynens <mathias@qiwi.be>
-Matt Lunn <matt@mattlunn.me.uk>
-Matt McClure <matt.mcclure@mapmyfitness.com>
-Nirk Niggler <nirk.niggler@gmail.com>
-Paolo Fragomeni <paolo@async.ly>
-Jake Verbaten (Raynos) <raynos2@gmail.com>
-Robert Kowalski <rok@kowalski.gd>
-Schabse Laks <Dev@SLaks.net>
-Stuart Knightley <stuart@stuartk.com>
-Stuart P. Bentley <stuart@testtrack4.com>
-Vaz Allen <vaz@tryptid.com>
-elisee <elisee@sparklin.org>
-Evan You <yyx990803@gmail.com>
-Wil Moore III <wil.moore@wilmoore.com>
-Dylan Greene <dylang@gmail.com>
-zeke <zeke@sikelianos.com>
-Andrew Horton <andrew.j.horton@gmail.com>
-Denis Gladkikh <outcoldman@gmail.com>
-Daniel Santiago <daniel.santiago@highlevelwebs.com>
-Alex Kocharin <alex@kocharin.ru>
-Evan Lucas <evanlucas@me.com>
-Steve Mason <stevem@brandwatch.com>
-Quinn Slack <qslack@qslack.com>
-Sébastien Santoro <dereckson@espace-win.org>
-CamilleM <camille.moulin@alterway.fr>
-Tom Huang <hzlhu.dargon@gmail.com>
-Sergey Belov <peimei@ya.ru>
-Younghoon Park <sola92@gmail.com>
-Yazhong Liu <yorkiefixer@gmail.com>
-Mikola Lysenko <mikolalysenko@gmail.com>
-Rafael de Oleza <rafa@spotify.com>
-Yeonghoon Park <sola92@gmail.com>
-Franck Cuny <franck.cuny@gmail.com>
-Alan Shaw <alan@freestyle-developments.co.uk>
-Alex Rodionov <p0deje@gmail.com>
-Alexej Yaroshevich <alex@qfox.ru>
-Elan Shanker <elan.shanker@gmail.com>
-François Frisch <francoisfrisch@gmail.com>
-Gabriel Falkenberg <gabriel.falkenberg@gmail.com>
-Jason Diamond <jason@diamond.name>
-Jess Martin <jessmartin@gmail.com>
-Jon Spencer <jon@jonspencer.ca>
-Matt Colyer <matt@colyer.name>
-Matt McClure <matt.mcclure@mapmyfitness.com>
-Maximilian Antoni <maximilian.antoni@juliusbaer.com>
-Nicholas Kinsey <pyro@feisty.io>
-Paulo Cesar <pauloc062@gmail.com>
-Quim Calpe <quim@kalpe.com>
-Robert Gieseke <robert.gieseke@gmail.com>
-Spain Train <michael.spainhower@opower.com>
-TJ Holowaychuk <tj@vision-media.ca>
-Thom Blake <tblake@brightroll.com>
-Trevor Burnham <tburnham@hubspot.com>
-bitspill <bitspill+github@bitspill.net>
-Neil Gentleman <ngentleman@gmail.com>
+timoweiss <timoweiss@Timo-MBP.local>
+Christopher Hiller <chiller@badwing.com>
+Olivier Melcher <olivier.melcher@gmail.com>
+Tomaž Muraus <kami@k5-storitve.net>
diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md
index b73d83ac70..248de8908d 100644
--- a/deps/npm/CHANGELOG.md
+++ b/deps/npm/CHANGELOG.md
@@ -1,3 +1,130 @@
+### v2.5.1 (2015-02-06):
+
+This release doesn't look like much, but considerable effort went into ensuring
+that npm's tests will pass on io.js 1.1.0 and Node 0.11.16 / 0.12.0 on both OS
+X and Linux.
+
+**NOTE:** there are no actual changes to npm's code in `npm@2.5.1`. Only test
+code (and the upgrade of `request` to the latest version) has changed.
+
+#### `npm-registry-mock@1.0.0`:
+
+* [`0e8d473`](https://github.com/npm/npm/commit/0e8d4736a1cbdda41ae8eba8a02c7ff7ce80c2ff)
+ [#7281](https://github.com/npm/npm/issues/7281) `npm-registry-mock@1.0.0`:
+ Clean up API, set `connection: close`.
+ ([@robertkowalski](https://github.com/robertkowalski))
+* [`4707bba`](https://github.com/npm/npm/commit/4707bba7d44dfab85cc45c2ecafa9c1601ba2e9a)
+ Further update tests to work with `npm-registry-mock@1.0.0`.
+ ([@othiym23](https://github.com/othiym23))
+* [`41a0f89`](https://github.com/npm/npm/commit/41a0f8959d4e02af9661588afa7d2b4543cc21b6)
+ Got rid of completely gratuitous global config manipulation in tests.
+ ([@othiym23](https://github.com/othiym23))
+
+#### MINOR DEPENDENCY TWEAK
+
+* [`a4c7af9`](https://github.com/npm/npm/commit/a4c7af9c692f250c0fd017397ed9514fc263b752)
+ `request@2.53.0`: Tweaks to tunneling proxy behavior.
+ ([@nylen](https://github.com/nylen))
+
+### v2.5.0 (2015-01-29):
+
+#### SMALL FEATURE I HAVE ALREADY USED TO MAINTAIN NPM ITSELF
+
+* [`9d61e96`](https://github.com/npm/npm/commit/9d61e96fb1f48687a85c211e4e0cd44c7f95a38e)
+ `npm outdated --long` now includes a column showing the type of dependency.
+ ([@watilde](https://github.com/watilde))
+
+#### BUG FIXES & TWEAKS
+
+* [`fec4c96`](https://github.com/npm/npm/commit/fec4c967ee235030bf31393e8605e9e2811f4a39)
+ Allow `--no-proxy` to override `HTTP_PROXY` setting in environment.
+ ([@othiym23](https://github.com/othiym23))
+* [`589acb9`](https://github.com/npm/npm/commit/589acb9714f395c2ad0d98cb0ac4236f1842d2cc)
+ Only set `access` when publshing when it's explicitly set.
+ ([@othiym23](https://github.com/othiym23))
+* [`1027087`](https://github.com/npm/npm/commit/102708704c8c4f0ea99775d38f8d1efecf584940)
+ Add script and `Makefile` stanza to update AUTHORS.
+ ([@KenanY](https://github.com/KenanY))
+* [`eeff04d`](https://github.com/npm/npm/commit/eeff04da7979a0181becd36b8777d607e7aa1787)
+ Add `NPMOPTS` to top-level install in `Makefile` to override `userconfig`.
+ ([@aredridel](https://github.com/aredridel))
+* [`0d17328`](https://github.com/npm/npm/commit/0d173287336650606d4c91818bb7bcfb0c5d57a1)
+ `fstream@1.0.4`: Run chown only when necessary.
+ ([@silkentrance](https://github.com/silkentrance))
+* [`9aa4622`](https://github.com/npm/npm/commit/9aa46226ee63b9e183fd49fc72d9bdb0fae9605e)
+ `columnify@1.4.1`: ES6ified! ([@timoxley](https://github.com/timoxley))
+* [`51b2fd1`](https://github.com/npm/npm/commit/51b2fd1974e38b825ac5ca4a852ab3c4142624cc)
+ Update default version in `docs/npm-config.md`.
+ ([@lucthev](https://github.com/lucthev))
+
+#### `npm-registry-client@6.0.7`:
+
+* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f)
+ [#7226](https://github.com/npm/npm/issues/7226) Ensure that all request
+ settings are copied onto the agent.
+ ([@othiym23](https://github.com/othiym23))
+* [`e186f6e`](https://github.com/npm/npm/commit/e186f6e7cfeb4db9c94d7375638f0b2f0d472947)
+ Only set `access` on publish when it differs from the norm.
+ ([@othiym23](https://github.com/othiym23))
+* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f)
+ Allow overriding request's environment-based proxy handling.
+ ([@othiym23](https://github.com/othiym23))
+* [`f9313a0`](https://github.com/npm/npm/commit/f9313a066c9889a0ee898d8a35676e40b8101e7f)
+ Properly handle retry failures on fetch.
+ ([@othiym23](https://github.com/othiym23))
+
+### v2.4.1 (2015-01-23):
+
+![bridge that doesn't meet in the middle](http://www.static-18.themodernnomad.com/wp-content/uploads/2011/08/bridge-fail.jpg)
+
+Let's accentuate the positive: the `dist-tag` endpoints for `npm dist-tag
+{add,rm,ls}` are now live on the public npm registry.
+
+* [`f70272b`](https://github.com/npm/npm/commit/f70272bed7d77032d1e21553371dd5662fef32f2)
+ `npm-registry-client@6.0.3`: Properly escape JSON tag version strings and
+ filter `_etag` from CouchDB docs. ([@othiym23](https://github.com/othiym23))
+
+### v2.4.0 (2015-01-22):
+
+#### REGISTRY 2: ACCESS AND DIST-TAGS
+
+NOTE: This week's registry-2 commands are leading the implementation on
+registry.npmjs.org a little bit, so some of the following may not work for
+another week or so. Also note that `npm access` has documentation and
+subcommands that are not yet finished, because they depend on incompletely
+specified registry API endpoints. Things are coming together very quickly,
+though, so expect the missing pieces to be filled in the coming weeks.
+
+* [`c963eb2`](https://github.com/npm/npm/commit/c963eb295cf766921b1680f4a71fd0ed3e1bcad8)
+ [#7181](https://github.com/npm/npm/issues/7181) NEW `npm access public` and
+ `npm access restricted`: Toggle visibility of scoped packages.
+ ([@othiym23](https://github.com/othiym23))
+* [`dc51810`](https://github.com/npm/npm/commit/dc51810e08c0f104259146c9c035d255de4f7d1d)
+ [#6243](https://github.com/npm/npm/issues/6243) /
+ [#6854](https://github.com/npm/npm/issues/6854) NEW `npm dist-tags`: Directly
+ manage `dist-tags` on packages. Most notably, `dist-tags` can now be deleted.
+ ([@othiym23](https://github.com/othiym23))
+* [`4c7c132`](https://github.com/npm/npm/commit/4c7c132a6b8305dca2974943226c39c0cdc64ff9)
+ [#7181](https://github.com/npm/npm/issues/7181) /
+ [#6854](https://github.com/npm/npm/issues/6854) `npm-registry-client@6.0.1`:
+ Add new `access` and `dist-tags` endpoints
+ ([@othiym23](https://github.com/othiym23))
+
+#### NOT EXACTLY SELF-DEPRECATING
+
+* [`10d5c77`](https://github.com/npm/npm/commit/10d5c77653487f15759ac7de262a97e9c655240c)
+ [#6274](https://github.com/npm/npm/issues/6274) Deprecate `npm tag` in favor
+ of `npm dist-tag`. ([@othiym23](https://github.com/othiym23))
+
+#### BUG FIX AND TINY FEATURE
+
+* [`29a6ef3`](https://github.com/npm/npm/commit/29a6ef38ef86ac318c5d9ea4bee28ce614672fa6)
+ [#6850](https://github.com/npm/npm/issues/6850) Be smarter about determining
+ base of file deletion when unbuilding. ([@phated](https://github.com/phated))
+* [`4ad01ea`](https://github.com/npm/npm/commit/4ad01ea2930a7a1cf88be121cc5ce9eba40c6807)
+ `init-package-json@1.2.0`: Support `--save-exact` in `npm init`.
+ ([@gustavnikolaj](https://github.com/gustavnikolaj))
+
### v2.3.0 (2015-01-15):
#### REGISTRY 2: OH MY STARS! WHO AM I?
diff --git a/deps/npm/Makefile b/deps/npm/Makefile
index 34d4b62de2..15655f3e5c 100644
--- a/deps/npm/Makefile
+++ b/deps/npm/Makefile
@@ -85,10 +85,10 @@ latest:
@echo "Installing latest published npm"
@echo "Use 'make install' or 'make link' to install the code"
@echo "in this folder that you're looking at right now."
- node cli.js install -g -f npm
+ node cli.js install -g -f npm ${NPMOPTS}
install: all
- node cli.js install -g -f
+ node cli.js install -g -f ${NPMOPTS}
# backwards compat
dev: install
@@ -230,7 +230,12 @@ test: doc
tag:
npm tag npm@$(PUBLISHTAG) latest
-publish: link doc
+authors:
+ @bash scripts/update-authors.sh &&\
+ git add AUTHORS &&\
+ git commit -m "update AUTHORS" || true
+
+publish: link doc authors
@git push origin :v$(shell npm -v) 2>&1 || true
git clean -fd &&\
git push origin $(BRANCH) &&\
@@ -243,4 +248,4 @@ release:
sandwich:
@[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || (echo "make it yourself" && exit 13)
-.PHONY: all latest install dev link doc clean uninstall test man doc-clean docclean release
+.PHONY: all latest install dev link doc clean uninstall test man doc-clean docclean release authors
diff --git a/deps/npm/doc/cli/npm-access.md b/deps/npm/doc/cli/npm-access.md
new file mode 100644
index 0000000000..85db7e6541
--- /dev/null
+++ b/deps/npm/doc/cli/npm-access.md
@@ -0,0 +1,63 @@
+npm-access(1) -- Set access level on published packages
+=======================================================
+
+## SYNOPSIS
+
+ npm access public [<package>]
+ npm access restricted [<package>]
+
+ npm access add <read-only|read-write> <entity> [<package>]
+ npm access rm <entity> [<package>]
+
+ npm access ls [<package>]
+ npm access edit [<package>]
+
+## DESCRIPTION
+
+Used to set access controls on private packages.
+
+For all of the subcommands, `npm access` will perform actions on the packages
+in the current working directory if no package name is passed to the
+subcommand.
+
+* public / restricted:
+ Set a package to be either publicly accessible or restricted.
+
+* add / rm:
+ Add or remove the ability of users and teams to have read-only or read-write
+ access to a package.
+
+* ls:
+ Show all of the access privileges for a package. Will only show permissions
+ for packages to which you have at least read access.
+
+* edit:
+ Set the access privileges for a package at once using `$EDITOR`.
+
+## DETAILS
+
+`npm access` always operates directly on the current registry, configurable
+from the command line using `--registry=<registry url>`.
+
+Unscoped packages are *always public*.
+
+Scoped packages *default to restricted*, but you can either publish them as
+public using `npm publish --access=public`, or set their access as public using
+`npm access public` after the initial publish.
+
+You must have privileges to set the access of a package:
+
+* You are an owner of an unscoped or scoped package.
+* You are a member of the team that owns a scope.
+* You have been given read-write privileges for a package, either as a member
+ of a team or directly as an owner.
+
+If your account is not paid, then attempts to publish scoped packages will fail
+with an HTTP 402 status code (logically enough), unless you use
+`--access=public`.
+
+## SEE ALSO
+
+* npm-publish(1)
+* npm-config(7)
+* npm-registry(7)
diff --git a/deps/npm/doc/cli/npm-dist-tag.md b/deps/npm/doc/cli/npm-dist-tag.md
new file mode 100644
index 0000000000..b8eabe7157
--- /dev/null
+++ b/deps/npm/doc/cli/npm-dist-tag.md
@@ -0,0 +1,72 @@
+npm-dist-tag(1) -- Modify package distribution tags
+===================================================
+
+## SYNOPSIS
+
+ npm dist-tag add <pkg>@<version> [<tag>]
+ npm dist-tag rm <pkg> <tag>
+ npm dist-tag ls [<pkg>]
+
+## DESCRIPTION
+
+Add, remove, and enumerate distribution tags on a package:
+
+* add:
+ Tags the specified version of the package with the specified tag, or the
+ `--tag` config if not specified.
+
+* rm:
+ Clear a tag that is no longer in use from the package.
+
+* ls:
+ Show all of the dist-tags for a package, defaulting to the package in
+ the curren prefix.
+
+A tag can be used when installing packages as a reference to a version instead
+of using a specific version number:
+
+ npm install <name>@<tag>
+
+When installing dependencies, a preferred tagged version may be specified:
+
+ npm install --tag <tag>
+
+This also applies to `npm dedupe`.
+
+Publishing a package always sets the "latest" tag to the published version.
+
+## PURPOSE
+
+Tags can be used to provide an alias instead of version numbers. For
+example, `npm` currently uses the tag "next" to identify the upcoming
+version, and the tag "latest" to identify the current version.
+
+A project might choose to have multiple streams of development, e.g.,
+"stable", "canary".
+
+## CAVEATS
+
+This command used to be known as `npm tag`, which only created new tags, and so
+had a different syntax.
+
+Tags must share a namespace with version numbers, because they are specified in
+the same slot: `npm install <pkg>@<version>` vs `npm install <pkg>@<tag>`.
+
+Tags that can be interpreted as valid semver ranges will be rejected. For
+example, `v1.4` cannot be used as a tag, because it is interpreted by semver as
+`>=1.4.0 <1.5.0`. See <https://github.com/npm/npm/issues/6082>.
+
+The simplest way to avoid semver problems with tags is to use tags that do not
+begin with a number or the letter `v`.
+
+## SEE ALSO
+
+* npm-tag(1)
+* npm-publish(1)
+* npm-install(1)
+* npm-dedupe(1)
+* npm-registry(7)
+* npm-config(1)
+* npm-config(7)
+* npm-tag(3)
+* npmrc(5)
diff --git a/deps/npm/doc/cli/npm-publish.md b/deps/npm/doc/cli/npm-publish.md
index 30e816c7fd..8c447d0df9 100644
--- a/deps/npm/doc/cli/npm-publish.md
+++ b/deps/npm/doc/cli/npm-publish.md
@@ -4,8 +4,8 @@ npm-publish(1) -- Publish a package
## SYNOPSIS
- npm publish <tarball> [--tag <tag>]
- npm publish <folder> [--tag <tag>]
+ npm publish <tarball> [--tag <tag>] [--access <public|restricted>]
+ npm publish <folder> [--tag <tag>] [--access <public|restricted>]
## DESCRIPTION
@@ -29,6 +29,12 @@ specifying a different default registry or using a `npm-scope(7)` in the name
<name>@<tag>` will install this version. By default, `npm publish` updates
and `npm install` installs the `latest` tag.
+* `[--access <public|restricted>]`
+ Tells the registry whether this package should be published as public or
+ restricted. Only applies to scoped packages, which default to `restricted`.
+ If you don't have a paid account, you must publish with `--access public`
+ to publish scoped packages.
+
Fails if the package name and version combination already exists in
the specified registry.
@@ -39,6 +45,7 @@ it is removed with npm-unpublish(1).
## SEE ALSO
* npm-registry(7)
+* npm-scope(7)
* npm-adduser(1)
* npm-owner(1)
* npm-deprecate(1)
diff --git a/deps/npm/doc/cli/npm-shrinkwrap.md b/deps/npm/doc/cli/npm-shrinkwrap.md
index 05637f21db..e17afcd259 100644
--- a/deps/npm/doc/cli/npm-shrinkwrap.md
+++ b/deps/npm/doc/cli/npm-shrinkwrap.md
@@ -88,7 +88,7 @@ This generates npm-shrinkwrap.json, which will look something like this:
"version": "0.0.1",
"dependencies": {
"C": {
- "version": "0.1.0"
+ "version": "0.0.1"
}
}
}
@@ -101,7 +101,7 @@ installs a package with a npm-shrinkwrap.json file in the package
root, the shrinkwrap file (rather than package.json files) completely
drives the installation of that package and all of its dependencies
(recursively). So now the author publishes A@0.1.0, and subsequent
-installs of this package will use B@0.0.1 and C@0.1.0, regardless the
+installs of this package will use B@0.0.1 and C@0.0.1, regardless the
dependencies and versions listed in A's, B's, and C's package.json
files.
diff --git a/deps/npm/doc/cli/npm-tag.md b/deps/npm/doc/cli/npm-tag.md
index 28a1c9334f..d7118d4e58 100644
--- a/deps/npm/doc/cli/npm-tag.md
+++ b/deps/npm/doc/cli/npm-tag.md
@@ -7,6 +7,8 @@ npm-tag(1) -- Tag a published version
## DESCRIPTION
+THIS COMMAND IS DEPRECATED. See npm-dist-tag(1) for details.
+
Tags the specified version of the package with the specified tag, or the
`--tag` config if not specified.
diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md
index 1a54ec06b3..933c23a64a 100644
--- a/deps/npm/doc/files/package.json.md
+++ b/deps/npm/doc/files/package.json.md
@@ -452,7 +452,7 @@ For example:
{
"name": "tea-latte",
- "version": "1.3.5"
+ "version": "1.3.5",
"peerDependencies": {
"tea": "2.x"
}
diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md
index 7aaaffb8d6..96dda6b9f5 100644
--- a/deps/npm/doc/misc/npm-config.md
+++ b/deps/npm/doc/misc/npm-config.md
@@ -55,7 +55,6 @@ The following shorthands are parsed on the command-line:
* `-m`: `--message`
* `-p`, `--porcelain`: `--parseable`
* `-reg`: `--registry`
-* `-v`: `--version`
* `-f`: `--force`
* `-desc`: `--description`
* `-S`: `--save`
@@ -107,6 +106,16 @@ See package.json(5) for more information.
## Config Settings
+### access
+
+* Default: `restricted`
+* Type: Access
+
+When publishing scoped packages, the access level defaults to `restricted`. If
+you want your scoped package to be publicly viewable (and installable) set
+`--access=public`. The only valid values for `access` are `public` and
+`restricted`. Unscoped packages _always_ have an access level of `public`.
+
### always-auth
* Default: false
@@ -423,7 +432,7 @@ The value `npm init` should use by default for the package license.
### init-version
-* Default: "0.0.0"
+* Default: "1.0.0"
* Type: semver
The value that `npm init` should use by default for the package
@@ -680,7 +689,7 @@ Only works if there is already a package.json file present.
Configure how versions of packages installed to a package.json file via
`--save` or `--save-dev` get prefixed.
-For example if a package has version `1.2.3`, by default it's version is
+For example if a package has version `1.2.3`, by default its version is
set to `^1.2.3` which allows minor upgrades for that package, but after
`npm config set save-prefix='~'` it would be set to `~1.2.3` which only allows
patch upgrades.
@@ -876,7 +885,6 @@ Set to `"browser"` to view html help content in the default web browser.
## SEE ALSO
* npm-config(1)
-* npm-config(7)
* npmrc(5)
* npm-scripts(7)
* npm-folders(5)
diff --git a/deps/npm/doc/misc/npm-index.md b/deps/npm/doc/misc/npm-index.md
index 96c62cced6..4cbfbdc8bc 100644
--- a/deps/npm/doc/misc/npm-index.md
+++ b/deps/npm/doc/misc/npm-index.md
@@ -13,6 +13,10 @@ Using npm on the command line
javascript package manager
+### npm-access(1)
+
+Set access level on published packages
+
### npm-adduser(1)
Add a registry user account
@@ -53,6 +57,10 @@ Reduce duplication
Deprecate a version of a package
+### npm-dist-tag(1)
+
+Modify package distribution tags
+
### npm-docs(1)
Docs for a package in a web browser maybe
diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html
index a9953056c9..ca7b622ca2 100644
--- a/deps/npm/html/doc/README.html
+++ b/deps/npm/html/doc/README.html
@@ -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="&#109;&#x61;&#105;&#x6c;&#x74;&#x6f;&#58;&#115;&#x75;&#112;&#x70;&#x6f;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#99;&#111;&#x6d;">&#115;&#x75;&#112;&#x70;&#x6f;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#99;&#111;&#x6d;</a> and explain the situation.</p>
+<a href="&#109;&#97;&#x69;&#108;&#x74;&#x6f;&#58;&#x73;&#117;&#112;&#x70;&#111;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#x63;&#x6f;&#x6d;">&#x73;&#117;&#112;&#x70;&#111;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#x63;&#x6f;&#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.3.0</p>
+<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html
index d1b9fb5bca..b1033738ad 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.3.0</p>
+<p id="footer">npm-bin &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html
index a7f3c3e4ad..47b11ef141 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.3.0</p>
+<p id="footer">npm-bugs &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html
index 952856f869..aa7c2eea3f 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.3.0</p>
+<p id="footer">npm-cache &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html
index 16292985c8..45af01d283 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.3.0</p>
+<p id="footer">npm-commands &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html
index 758eef37ac..bea72420ca 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.3.0</p>
+<p id="footer">npm-config &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html
index eb965608ef..b00c11cf0c 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.3.0</p>
+<p id="footer">npm-deprecate &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html
index 25fa5167f4..c478fbbcf5 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.3.0</p>
+<p id="footer">npm-docs &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html
index f7e777d86d..1f74d8f3dc 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.3.0</p>
+<p id="footer">npm-edit &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html
index fb8b36e1b2..4e8703563f 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.3.0</p>
+<p id="footer">npm-explore &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html
index 3612ae521f..bb188c1ec2 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.3.0</p>
+<p id="footer">npm-help-search &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html
index dc32dfdbe5..6dcc3e2dea 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.3.0</p>
+<p id="footer">npm-init &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html
index ef095d462c..f2f89c95a9 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.3.0</p>
+<p id="footer">npm-install &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html
index 7a80c5297d..195701e899 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.3.0</p>
+<p id="footer">npm-link &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html
index 3882694cf0..67c5216dcb 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.3.0</p>
+<p id="footer">npm-load &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html
index 8b0bc0c6fb..3d80294fe0 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.3.0</p>
+<p id="footer">npm-ls &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html
index eeff9318d0..a2c442d0c5 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.3.0</p>
+<p id="footer">npm-outdated &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html
index 6fff137875..97e3671e35 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.3.0</p>
+<p id="footer">npm-owner &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html
index 13a1ed8f5d..763199e991 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.3.0</p>
+<p id="footer">npm-pack &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html
index 22398c50df..f4e6a703d6 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.3.0</p>
+<p id="footer">npm-prefix &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html
index 6ee9e7d59f..6fb8718ca8 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.3.0</p>
+<p id="footer">npm-prune &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html
index dccedcab6c..bbbe2a1021 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.3.0</p>
+<p id="footer">npm-publish &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html
index 1203b177a2..7edc466ea3 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.3.0</p>
+<p id="footer">npm-rebuild &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html
index 718f55aae6..b5a41a08db 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.3.0</p>
+<p id="footer">npm-repo &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html
index e3c90034fe..5be2e68cf8 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.3.0</p>
+<p id="footer">npm-restart &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html
index 5231b853fd..744df599fc 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.3.0</p>
+<p id="footer">npm-root &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html
index c9877f4012..639a71fcac 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.3.0</p>
+<p id="footer">npm-run-script &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html
index 8d116367ae..63121ffe26 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.3.0</p>
+<p id="footer">npm-search &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html
index 08aec3538c..de43ebc0a3 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.3.0</p>
+<p id="footer">npm-shrinkwrap &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html
index 74e8271a54..b10a6c499f 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.3.0</p>
+<p id="footer">npm-start &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html
index 018b57ea3b..83e258bdd8 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.3.0</p>
+<p id="footer">npm-stop &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html
index bc145f5f05..104f5b733c 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.3.0</p>
+<p id="footer">npm-tag &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html
index b799e3a7ff..dd9677e76e 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.3.0</p>
+<p id="footer">npm-test &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html
index 51720cc7d8..f1fa1c3bcc 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.3.0</p>
+<p id="footer">npm-uninstall &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html
index 004ca7ed7f..3e0c4ab2ef 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.3.0</p>
+<p id="footer">npm-unpublish &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html
index 5feecc4b46..577101a21b 100644
--- a/deps/npm/html/doc/api/npm-update.html
+++ b/deps/npm/html/doc/api/npm-update.html
@@ -27,5 +27,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-update &mdash; npm@2.3.0</p>
+<p id="footer">npm-update &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html
index cdd410a14c..115f4f90cd 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.3.0</p>
+<p id="footer">npm-version &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html
index 627f9e65f0..73286ece8b 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.3.0</p>
+<p id="footer">npm-view &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html
index c381923cd8..5d1324d1c1 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.3.0</p>
+<p id="footer">npm-whoami &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html
index ef985922c6..4f41ebe49d 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.3.0</p>
+<p>2.5.1</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.3.0</p>
+<p id="footer">npm &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html
index 3d0a290500..f5ac65b05a 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.4.0</p>
+<p id="footer">npm-access &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html
index 541ad0c41f..01d6b22aac 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.3.0</p>
+<p id="footer">npm-adduser &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html
index 0f61d5c0be..d896b96a1d 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.3.0</p>
+<p id="footer">npm-bin &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html
index ccb59fe063..ed55e03a71 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.3.0</p>
+<p id="footer">npm-bugs &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html
index a32234b9f7..52efad1940 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.3.0</p>
+<p id="footer">npm-build &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html
index 2aec65af8a..9db76b5b12 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.3.0</p>
+<p id="footer">npm-bundle &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html
index d0d392a29c..4b3fa05f07 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.3.0</p>
+<p id="footer">npm-cache &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html
index 69da1503e4..1d6870b04f 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.3.0</p>
+<p id="footer">npm-completion &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html
index 7521a212a8..822f570acf 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.3.0</p>
+<p id="footer">npm-config &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html
index 2ea5f3de96..1cc3f7431d 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.3.0</p>
+<p id="footer">npm-dedupe &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html
index 886ddd1696..574babd59b 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.3.0</p>
+<p id="footer">npm-deprecate &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html
index 9fcab6ac14..d41abe0602 100644
--- a/deps/npm/html/doc/cli/npm-dist-tag.html
+++ b/deps/npm/html/doc/cli/npm-dist-tag.html
@@ -76,5 +76,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.4.0</p>
+<p id="footer">npm-dist-tag &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html
index 0721663da0..e08070ac58 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.3.0</p>
+<p id="footer">npm-docs &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html
index 6a068adb15..abf6feae5a 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.3.0</p>
+<p id="footer">npm-edit &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html
index 38e79ce0d6..3bd89c91ed 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.3.0</p>
+<p id="footer">npm-explore &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html
index 3584c29b88..dbc1b6db57 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.3.0</p>
+<p id="footer">npm-help-search &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html
index eb463a8cd9..9983581828 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.3.0</p>
+<p id="footer">npm-help &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html
index c0586d97b7..09404ec01c 100644
--- a/deps/npm/html/doc/cli/npm-init.html
+++ b/deps/npm/html/doc/cli/npm-init.html
@@ -40,5 +40,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.3.0</p>
+<p id="footer">npm-init &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html
index 6a7f9dd7dd..f3fb078ea9 100644
--- a/deps/npm/html/doc/cli/npm-install.html
+++ b/deps/npm/html/doc/cli/npm-install.html
@@ -239,5 +239,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.3.0</p>
+<p id="footer">npm-install &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html
index b783736d32..c52434c591 100644
--- a/deps/npm/html/doc/cli/npm-link.html
+++ b/deps/npm/html/doc/cli/npm-link.html
@@ -71,5 +71,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.3.0</p>
+<p id="footer">npm-link &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html
index d4d80cfdaa..cdbd56bfd9 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.3.0 /path/to/npm
+<pre><code>npm@2.5.1 /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>
@@ -85,5 +85,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.3.0</p>
+<p id="footer">npm-ls &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html
index 81552873ad..1b1414d710 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.3.0</p>
+<p id="footer">npm-outdated &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html
index ed9bcafcb9..9d6e4541cc 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.3.0</p>
+<p id="footer">npm-owner &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html
index c5ebe07989..cf7fcaed9f 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.3.0</p>
+<p id="footer">npm-pack &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html
index f3926644ed..98f44e133d 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.3.0</p>
+<p id="footer">npm-prefix &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html
index 03b306dad3..247a291d78 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.3.0</p>
+<p id="footer">npm-prune &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html
index 6dc61da658..23559cacd6 100644
--- a/deps/npm/html/doc/cli/npm-publish.html
+++ b/deps/npm/html/doc/cli/npm-publish.html
@@ -11,8 +11,8 @@
<h1><a href="../cli/npm-publish.html">npm-publish</a></h1> <p>Publish a package</p>
<h2 id="synopsis">SYNOPSIS</h2>
-<pre><code>npm publish &lt;tarball&gt; [--tag &lt;tag&gt;]
-npm publish &lt;folder&gt; [--tag &lt;tag&gt;]
+<pre><code>npm publish &lt;tarball&gt; [--tag &lt;tag&gt;] [--access &lt;public|restricted&gt;]
+npm publish &lt;folder&gt; [--tag &lt;tag&gt;] [--access &lt;public|restricted&gt;]
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>Publishes a package to the registry so that it can be installed by name. See
<code><a href="../misc/npm-developers.html"><a href="../misc/npm-developers.html">npm-developers(7)</a></a></code> for details on what&#39;s included in the published package, as
@@ -33,6 +33,12 @@ Registers the published package with the given tag, such that <code>npm install
&lt;name&gt;@&lt;tag&gt;</code> will install this version. By default, <code>npm publish</code> updates
and <code>npm install</code> installs the <code>latest</code> tag.</p>
</li>
+<li><p><code>[--access &lt;public|restricted&gt;]</code>
+Tells the registry whether this package should be published as public or
+restricted. Only applies to scoped packages, which default to <code>restricted</code>.
+If you don&#39;t have a paid account, you must publish with <code>--access public</code>
+to publish scoped packages.</p>
+</li>
</ul>
<p>Fails if the package name and version combination already exists in
the specified registry.</p>
@@ -42,6 +48,7 @@ it is removed with <a href="../cli/npm-unpublish.html"><a href="../cli/npm-unpub
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../misc/npm-registry.html"><a href="../misc/npm-registry.html">npm-registry(7)</a></a></li>
+<li><a href="../misc/npm-scope.html"><a href="../misc/npm-scope.html">npm-scope(7)</a></a></li>
<li><a href="../cli/npm-adduser.html"><a href="../cli/npm-adduser.html">npm-adduser(1)</a></a></li>
<li><a href="../cli/npm-owner.html"><a href="../cli/npm-owner.html">npm-owner(1)</a></a></li>
<li><a href="../cli/npm-deprecate.html"><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></a></li>
@@ -59,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.3.0</p>
+<p id="footer">npm-publish &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html
index 27252fcbba..bcf73eca7e 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.3.0</p>
+<p id="footer">npm-rebuild &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html
index 2ac34d35d4..5eb88eae94 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.3.0</p>
+<p id="footer">npm-repo &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html
index e107a541c0..67b397552b 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.3.0</p>
+<p id="footer">npm-restart &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html
index 617de0c681..c832eee203 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.3.0</p>
+<p id="footer">npm-rm &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html
index 08adcec8e1..c9df7b98fd 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.3.0</p>
+<p id="footer">npm-root &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html
index 508e04025a..716ad484a4 100644
--- a/deps/npm/html/doc/cli/npm-run-script.html
+++ b/deps/npm/html/doc/cli/npm-run-script.html
@@ -50,5 +50,5 @@ and not to any pre or post script.</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.3.0</p>
+<p id="footer">npm-run-script &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html
index 7b613de6b3..88ad801bc6 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.3.0</p>
+<p id="footer">npm-search &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html
index 2495eeb3aa..21c104f59b 100644
--- a/deps/npm/html/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html
@@ -78,7 +78,7 @@ when B hasn&#39;t changed at all.</p>
&quot;version&quot;: &quot;0.0.1&quot;,
&quot;dependencies&quot;: {
&quot;C&quot;: {
- &quot;version&quot;: &quot;0.1.0&quot;
+ &quot;version&quot;: &quot;0.0.1&quot;
}
}
}
@@ -90,7 +90,7 @@ installs a package with a npm-shrinkwrap.json file in the package
root, the shrinkwrap file (rather than package.json files) completely
drives the installation of that package and all of its dependencies
(recursively). So now the author publishes A@0.1.0, and subsequent
-installs of this package will use B@0.0.1 and C@0.1.0, regardless the
+installs of this package will use B@0.0.1 and C@0.0.1, regardless the
dependencies and versions listed in A&#39;s, B&#39;s, and C&#39;s package.json
files.</p>
<h3 id="using-shrinkwrapped-packages">Using shrinkwrapped packages</h3>
@@ -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.3.0</p>
+<p id="footer">npm-shrinkwrap &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html
index ae434f6e40..58c2c240c1 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.3.0</p>
+<p id="footer">npm-star &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html
index 6ec03a5099..0ffb3f4d5e 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.3.0</p>
+<p id="footer">npm-stars &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html
index eedbd240c2..330378cd81 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.3.0</p>
+<p id="footer">npm-start &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html
index 610da60698..ee69ec0304 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.3.0</p>
+<p id="footer">npm-stop &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html
index 57757dfa79..d66caeebd3 100644
--- a/deps/npm/html/doc/cli/npm-tag.html
+++ b/deps/npm/html/doc/cli/npm-tag.html
@@ -13,6 +13,7 @@
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm tag &lt;name&gt;@&lt;version&gt; [&lt;tag&gt;]
</code></pre><h2 id="description">DESCRIPTION</h2>
+<p>THIS COMMAND IS DEPRECATED. See <a href="../cli/npm-dist-tag.html"><a href="../cli/npm-dist-tag.html">npm-dist-tag(1)</a></a> for details.</p>
<p>Tags the specified version of the package with the specified tag, or the
<code>--tag</code> config if not specified.</p>
<p>A tag can be used when installing packages as a reference to a version instead
@@ -61,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.3.0</p>
+<p id="footer">npm-tag &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html
index e7eacf8890..401a51304e 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.3.0</p>
+<p id="footer">npm-test &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html
index a0799b36b1..ef33583b31 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.3.0</p>
+<p id="footer">npm-uninstall &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html
index a277055b1f..f31a4f03b8 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.3.0</p>
+<p id="footer">npm-unpublish &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html
index d1e66aa812..441c0b1a89 100644
--- a/deps/npm/html/doc/cli/npm-update.html
+++ b/deps/npm/html/doc/cli/npm-update.html
@@ -42,5 +42,5 @@ or local) will be updated.</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.3.0</p>
+<p id="footer">npm-update &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html
index dfb537a74d..bb0fe413ad 100644
--- a/deps/npm/html/doc/cli/npm-version.html
+++ b/deps/npm/html/doc/cli/npm-version.html
@@ -55,5 +55,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.3.0</p>
+<p id="footer">npm-version &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html
index 8c54064ce5..3fa8beb789 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.3.0</p>
+<p id="footer">npm-view &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html
index fbd5544e95..eb8274f960 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.3.0</p>
+<p id="footer">npm-whoami &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html
index f561c7eb82..8651e98937 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.3.0</p>
+<p>2.5.1</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;&#x61;&#x69;&#x6c;&#x74;&#111;&#x3a;&#x6e;&#112;&#109;&#45;&#64;&#x67;&#x6f;&#x6f;&#x67;&#108;&#101;&#x67;&#x72;&#x6f;&#117;&#x70;&#115;&#x2e;&#99;&#111;&#x6d;">&#x6e;&#112;&#109;&#45;&#64;&#x67;&#x6f;&#x6f;&#x67;&#108;&#101;&#x67;&#x72;&#x6f;&#117;&#x70;&#115;&#x2e;&#99;&#111;&#x6d;</a></li>
+<li><a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#x3a;&#x6e;&#x70;&#109;&#x2d;&#64;&#103;&#111;&#x6f;&#x67;&#108;&#101;&#x67;&#x72;&#111;&#x75;&#x70;&#x73;&#46;&#99;&#111;&#x6d;">&#x6e;&#x70;&#109;&#x2d;&#64;&#103;&#111;&#x6f;&#x67;&#108;&#101;&#x67;&#x72;&#111;&#x75;&#x70;&#x73;&#46;&#99;&#111;&#x6d;</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="&#x6d;&#97;&#105;&#x6c;&#116;&#x6f;&#58;&#x6e;&#x70;&#x6d;&#45;&#x40;&#103;&#111;&#x6f;&#x67;&#x6c;&#x65;&#x67;&#x72;&#111;&#117;&#112;&#115;&#46;&#99;&#x6f;&#109;">&#x6e;&#x70;&#x6d;&#45;&#x40;&#103;&#111;&#x6f;&#x67;&#x6c;&#x65;&#x67;&#x72;&#111;&#117;&#112;&#115;&#46;&#99;&#x6f;&#109;</a></li>
+<a href="&#x6d;&#x61;&#x69;&#108;&#116;&#111;&#58;&#x6e;&#112;&#109;&#x2d;&#x40;&#x67;&#111;&#x6f;&#103;&#x6c;&#x65;&#103;&#x72;&#111;&#x75;&#112;&#x73;&#x2e;&#x63;&#111;&#x6d;">&#x6e;&#112;&#109;&#x2d;&#x40;&#x67;&#111;&#x6f;&#103;&#x6c;&#x65;&#103;&#x72;&#111;&#x75;&#112;&#x73;&#x2e;&#x63;&#111;&#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="&#109;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#105;&#64;&#x69;&#x7a;&#x73;&#46;&#x6d;&#101;">&#105;&#64;&#x69;&#x7a;&#x73;&#46;&#x6d;&#101;</a></p>
+<a href="&#109;&#x61;&#x69;&#108;&#116;&#111;&#58;&#105;&#64;&#105;&#122;&#x73;&#x2e;&#x6d;&#x65;">&#105;&#64;&#105;&#122;&#x73;&#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.3.0</p>
+<p id="footer">npm &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html
index 67b03a2b02..a8e58e4185 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.3.0</p>
+<p id="footer">npm-folders &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html
index 2155a83a48..202d7f4974 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.3.0</p>
+<p id="footer">npm-global &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html
index aa279fe371..b915f8482e 100644
--- a/deps/npm/html/doc/files/npm-json.html
+++ b/deps/npm/html/doc/files/npm-json.html
@@ -336,7 +336,7 @@ a specific interface, expected and specified by the host documentation.</p>
<p>For example:</p>
<pre><code>{
&quot;name&quot;: &quot;tea-latte&quot;,
- &quot;version&quot;: &quot;1.3.5&quot;
+ &quot;version&quot;: &quot;1.3.5&quot;,
&quot;peerDependencies&quot;: {
&quot;tea&quot;: &quot;2.x&quot;
}
@@ -488,5 +488,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.3.0</p>
+<p id="footer">npm-json &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html
index 976a6404f1..92dfa7f019 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.3.0</p>
+<p id="footer">npmrc &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html
index c4c175dd0d..e3213a34ad 100644
--- a/deps/npm/html/doc/files/package.json.html
+++ b/deps/npm/html/doc/files/package.json.html
@@ -336,7 +336,7 @@ a specific interface, expected and specified by the host documentation.</p>
<p>For example:</p>
<pre><code>{
&quot;name&quot;: &quot;tea-latte&quot;,
- &quot;version&quot;: &quot;1.3.5&quot;
+ &quot;version&quot;: &quot;1.3.5&quot;,
&quot;peerDependencies&quot;: {
&quot;tea&quot;: &quot;2.x&quot;
}
@@ -488,5 +488,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.3.0</p>
+<p id="footer">package.json &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html
index e10541d7a4..f3d1298781 100644
--- a/deps/npm/html/doc/index.html
+++ b/deps/npm/html/doc/index.html
@@ -16,6 +16,8 @@
<p>Using npm on the command line</p>
<h3 id="npm-1-"><a href="cli/npm.html"><a href="cli/npm.html">npm(1)</a></a></h3>
<p>javascript package manager</p>
+<h3 id="npm-access-1-"><a href="cli/npm-access.html"><a href="cli/npm-access.html">npm-access(1)</a></a></h3>
+<p>Set access level on published packages</p>
<h3 id="npm-adduser-1-"><a href="cli/npm-adduser.html"><a href="cli/npm-adduser.html">npm-adduser(1)</a></a></h3>
<p>Add a registry user account</p>
<h3 id="npm-bin-1-"><a href="cli/npm-bin.html"><a href="cli/npm-bin.html">npm-bin(1)</a></a></h3>
@@ -36,6 +38,8 @@
<p>Reduce duplication</p>
<h3 id="npm-deprecate-1-"><a href="cli/npm-deprecate.html"><a href="cli/npm-deprecate.html">npm-deprecate(1)</a></a></h3>
<p>Deprecate a version of a package</p>
+<h3 id="npm-dist-tag-1-"><a href="cli/npm-dist-tag.html"><a href="cli/npm-dist-tag.html">npm-dist-tag(1)</a></a></h3>
+<p>Modify package distribution tags</p>
<h3 id="npm-docs-1-"><a href="cli/npm-docs.html"><a href="cli/npm-docs.html">npm-docs(1)</a></a></h3>
<p>Docs for a package in a web browser maybe</p>
<h3 id="npm-edit-1-"><a href="cli/npm-edit.html"><a href="cli/npm-edit.html">npm-edit(1)</a></a></h3>
@@ -230,5 +234,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.3.0</p>
+<p id="footer">index &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html
index f792436194..1c6d6a41f0 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.3.0</p>
+<p id="footer">npm-coding-style &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html
index 337d982293..702fef09d9 100644
--- a/deps/npm/html/doc/misc/npm-config.html
+++ b/deps/npm/html/doc/misc/npm-config.html
@@ -53,7 +53,6 @@ defaults if nothing else is specified.</p>
<li><code>-m</code>: <code>--message</code></li>
<li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li>
<li><code>-reg</code>: <code>--registry</code></li>
-<li><code>-v</code>: <code>--version</code></li>
<li><code>-f</code>: <code>--force</code></li>
<li><code>-desc</code>: <code>--description</code></li>
<li><code>-S</code>: <code>--save</code></li>
@@ -92,6 +91,15 @@ this:</p>
<pre><code>npm config set foo:port 80
</code></pre><p>See <a href="../files/package.json.html"><a href="../files/package.json.html">package.json(5)</a></a> for more information.</p>
<h2 id="config-settings">Config Settings</h2>
+<h3 id="access">access</h3>
+<ul>
+<li>Default: <code>restricted</code></li>
+<li>Type: Access</li>
+</ul>
+<p>When publishing scoped packages, the access level defaults to <code>restricted</code>. If
+you want your scoped package to be publicly viewable (and installable) set
+<code>--access=public</code>. The only valid values for <code>access</code> are <code>public</code> and
+<code>restricted</code>. Unscoped packages <em>always</em> have an access level of <code>public</code>.</p>
<h3 id="always-auth">always-auth</h3>
<ul>
<li>Default: false</li>
@@ -365,7 +373,7 @@ for more information, or <a href="../cli/npm-init.html"><a href="../cli/npm-init
<p>The value <code>npm init</code> should use by default for the package license.</p>
<h3 id="init-version">init-version</h3>
<ul>
-<li>Default: &quot;0.0.0&quot;</li>
+<li>Default: &quot;1.0.0&quot;</li>
<li>Type: semver</li>
</ul>
<p>The value that <code>npm init</code> should use by default for the package
@@ -583,7 +591,7 @@ optionalDependencies.</p>
</ul>
<p>Configure how versions of packages installed to a package.json file via
<code>--save</code> or <code>--save-dev</code> get prefixed.</p>
-<p>For example if a package has version <code>1.2.3</code>, by default it&#39;s version is
+<p>For example if a package has version <code>1.2.3</code>, by default its version is
set to <code>^1.2.3</code> which allows minor upgrades for that package, but after
<code>npm config set save-prefix=&#39;~&#39;</code> it would be set to <code>~1.2.3</code> which only allows
patch upgrades.</p>
@@ -749,7 +757,6 @@ exit successfully.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-config.html"><a href="../cli/npm-config.html">npm-config(1)</a></a></li>
-<li><a href="../misc/npm-config.html"><a href="../misc/npm-config.html">npm-config(7)</a></a></li>
<li><a href="../files/npmrc.html"><a href="../files/npmrc.html">npmrc(5)</a></a></li>
<li><a href="../misc/npm-scripts.html"><a href="../misc/npm-scripts.html">npm-scripts(7)</a></a></li>
<li><a href="../files/npm-folders.html"><a href="../files/npm-folders.html">npm-folders(5)</a></a></li>
@@ -767,5 +774,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.3.0</p>
+<p id="footer">npm-config &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html
index 1ef6966b78..64539b142d 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.3.0</p>
+<p id="footer">npm-developers &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html
index ea48218f53..d60c083797 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="&#109;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#115;&#117;&#x70;&#x70;&#x6f;&#x72;&#116;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;">&#115;&#117;&#x70;&#x70;&#x6f;&#x72;&#116;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;</a></li>
+<li>Email the author, CC <a href="&#109;&#x61;&#105;&#x6c;&#x74;&#x6f;&#58;&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#109;&#106;&#115;&#x2e;&#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="&#x6d;&#x61;&#x69;&#x6c;&#x74;&#111;&#58;&#115;&#117;&#x70;&#112;&#111;&#114;&#x74;&#64;&#110;&#x70;&#109;&#x6a;&#x73;&#46;&#x63;&#111;&#x6d;">&#115;&#117;&#x70;&#112;&#111;&#114;&#x74;&#64;&#110;&#x70;&#109;&#x6a;&#x73;&#46;&#x63;&#111;&#x6d;</a> to the CC list of
+adds the npm support staff <a href="&#109;&#x61;&#105;&#108;&#x74;&#111;&#x3a;&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;">&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#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;&#116;&#x6f;&#58;&#115;&#x75;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#112;&#x6d;&#106;&#115;&#x2e;&#99;&#111;&#x6d;">&#115;&#x75;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#112;&#x6d;&#106;&#115;&#x2e;&#99;&#111;&#x6d;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
+<a href="&#109;&#x61;&#105;&#x6c;&#116;&#x6f;&#x3a;&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#111;&#109;">&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#111;&#109;</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.3.0</p>
+<p id="footer">npm-disputes &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/misc/npm-faq.html b/deps/npm/html/doc/misc/npm-faq.html
index 0372168e1e..165b6258a1 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;&#97;&#x69;&#x6c;&#116;&#x6f;&#58;&#115;&#x75;&#x70;&#112;&#111;&#114;&#x74;&#64;&#110;&#x70;&#x6d;&#106;&#115;&#x2e;&#x63;&#111;&#x6d;">&#115;&#x75;&#x70;&#112;&#111;&#114;&#x74;&#64;&#110;&#x70;&#x6d;&#106;&#115;&#x2e;&#x63;&#111;&#x6d;</a>
+<p>If the registry IS down, let us know by emailing <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#115;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#64;&#x6e;&#x70;&#x6d;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#115;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#64;&#x6e;&#x70;&#x6d;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;</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.3.0</p>
+<p id="footer">npm-faq &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html
index 7faca1768f..9ad872c5bf 100644
--- a/deps/npm/html/doc/misc/npm-index.html
+++ b/deps/npm/html/doc/misc/npm-index.html
@@ -16,6 +16,8 @@
<p>Using npm on the command line</p>
<h3 id="npm-1-"><a href="../cli/npm.html"><a href="../cli/npm.html">npm(1)</a></a></h3>
<p>javascript package manager</p>
+<h3 id="npm-access-1-"><a href="../cli/npm-access.html"><a href="../cli/npm-access.html">npm-access(1)</a></a></h3>
+<p>Set access level on published packages</p>
<h3 id="npm-adduser-1-"><a href="../cli/npm-adduser.html"><a href="../cli/npm-adduser.html">npm-adduser(1)</a></a></h3>
<p>Add a registry user account</p>
<h3 id="npm-bin-1-"><a href="../cli/npm-bin.html"><a href="../cli/npm-bin.html">npm-bin(1)</a></a></h3>
@@ -36,6 +38,8 @@
<p>Reduce duplication</p>
<h3 id="npm-deprecate-1-"><a href="../cli/npm-deprecate.html"><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></a></h3>
<p>Deprecate a version of a package</p>
+<h3 id="npm-dist-tag-1-"><a href="../cli/npm-dist-tag.html"><a href="../cli/npm-dist-tag.html">npm-dist-tag(1)</a></a></h3>
+<p>Modify package distribution tags</p>
<h3 id="npm-docs-1-"><a href="../cli/npm-docs.html"><a href="../cli/npm-docs.html">npm-docs(1)</a></a></h3>
<p>Docs for a package in a web browser maybe</p>
<h3 id="npm-edit-1-"><a href="../cli/npm-edit.html"><a href="../cli/npm-edit.html">npm-edit(1)</a></a></h3>
@@ -230,5 +234,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.3.0</p>
+<p id="footer">npm-index &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html
index 84972d7676..72e3a1b552 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.3.0</p>
+<p id="footer">npm-registry &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html
index 7acbeabed4..8e25e12c44 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.3.0</p>
+<p id="footer">npm-scope &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html
index b25a69d36e..4dcac1793e 100644
--- a/deps/npm/html/doc/misc/npm-scripts.html
+++ b/deps/npm/html/doc/misc/npm-scripts.html
@@ -216,5 +216,5 @@ the user will sudo the npm command in question.</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.3.0</p>
+<p id="footer">npm-scripts &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html
index 034c4b639c..2e497cdda8 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.3.0</p>
+<p id="footer">removing-npm &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html
index a3832b091f..c8baab6d13 100644
--- a/deps/npm/html/doc/misc/semver.html
+++ b/deps/npm/html/doc/misc/semver.html
@@ -279,5 +279,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.3.0</p>
+<p id="footer">semver &mdash; npm@2.5.1</p>
diff --git a/deps/npm/html/partial/doc/README.html b/deps/npm/html/partial/doc/README.html
index 3aaea64eb1..9dedc3b11b 100644
--- a/deps/npm/html/partial/doc/README.html
+++ b/deps/npm/html/partial/doc/README.html
@@ -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="&#109;&#x61;&#105;&#x6c;&#x74;&#x6f;&#58;&#115;&#x75;&#112;&#x70;&#x6f;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#99;&#111;&#x6d;">&#115;&#x75;&#112;&#x70;&#x6f;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#99;&#111;&#x6d;</a> and explain the situation.</p>
+<a href="&#109;&#97;&#x69;&#108;&#x74;&#x6f;&#58;&#x73;&#117;&#112;&#x70;&#111;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#x63;&#x6f;&#x6d;">&#x73;&#117;&#112;&#x70;&#111;&#x72;&#x74;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#x2e;&#x63;&#x6f;&#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 1ca51d38da..207f251030 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.3.0</p>
+<p>2.5.1</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-ls.html b/deps/npm/html/partial/doc/cli/npm-ls.html
index 788a0d2adb..4ede498f3a 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.3.0 /path/to/npm
+<pre><code>npm@2.5.1 /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-publish.html b/deps/npm/html/partial/doc/cli/npm-publish.html
index 8df73e3d21..8d9321292a 100644
--- a/deps/npm/html/partial/doc/cli/npm-publish.html
+++ b/deps/npm/html/partial/doc/cli/npm-publish.html
@@ -1,7 +1,7 @@
<h1><a href="../cli/npm-publish.html">npm-publish</a></h1> <p>Publish a package</p>
<h2 id="synopsis">SYNOPSIS</h2>
-<pre><code>npm publish &lt;tarball&gt; [--tag &lt;tag&gt;]
-npm publish &lt;folder&gt; [--tag &lt;tag&gt;]
+<pre><code>npm publish &lt;tarball&gt; [--tag &lt;tag&gt;] [--access &lt;public|restricted&gt;]
+npm publish &lt;folder&gt; [--tag &lt;tag&gt;] [--access &lt;public|restricted&gt;]
</code></pre><h2 id="description">DESCRIPTION</h2>
<p>Publishes a package to the registry so that it can be installed by name. See
<code><a href="../misc/npm-developers.html">npm-developers(7)</a></code> for details on what&#39;s included in the published package, as
@@ -22,6 +22,12 @@ Registers the published package with the given tag, such that <code>npm install
&lt;name&gt;@&lt;tag&gt;</code> will install this version. By default, <code>npm publish</code> updates
and <code>npm install</code> installs the <code>latest</code> tag.</p>
</li>
+<li><p><code>[--access &lt;public|restricted&gt;]</code>
+Tells the registry whether this package should be published as public or
+restricted. Only applies to scoped packages, which default to <code>restricted</code>.
+If you don&#39;t have a paid account, you must publish with <code>--access public</code>
+to publish scoped packages.</p>
+</li>
</ul>
<p>Fails if the package name and version combination already exists in
the specified registry.</p>
@@ -31,6 +37,7 @@ it is removed with <a href="../cli/npm-unpublish.html">npm-unpublish(1)</a>.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../misc/npm-registry.html">npm-registry(7)</a></li>
+<li><a href="../misc/npm-scope.html">npm-scope(7)</a></li>
<li><a href="../cli/npm-adduser.html">npm-adduser(1)</a></li>
<li><a href="../cli/npm-owner.html">npm-owner(1)</a></li>
<li><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></li>
diff --git a/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html
index 45b646c030..82bb81f168 100644
--- a/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html
@@ -67,7 +67,7 @@ when B hasn&#39;t changed at all.</p>
&quot;version&quot;: &quot;0.0.1&quot;,
&quot;dependencies&quot;: {
&quot;C&quot;: {
- &quot;version&quot;: &quot;0.1.0&quot;
+ &quot;version&quot;: &quot;0.0.1&quot;
}
}
}
@@ -79,7 +79,7 @@ installs a package with a npm-shrinkwrap.json file in the package
root, the shrinkwrap file (rather than package.json files) completely
drives the installation of that package and all of its dependencies
(recursively). So now the author publishes A@0.1.0, and subsequent
-installs of this package will use B@0.0.1 and C@0.1.0, regardless the
+installs of this package will use B@0.0.1 and C@0.0.1, regardless the
dependencies and versions listed in A&#39;s, B&#39;s, and C&#39;s package.json
files.</p>
<h3 id="using-shrinkwrapped-packages">Using shrinkwrapped packages</h3>
diff --git a/deps/npm/html/partial/doc/cli/npm-tag.html b/deps/npm/html/partial/doc/cli/npm-tag.html
index 3d0ff71861..b12d5de7a4 100644
--- a/deps/npm/html/partial/doc/cli/npm-tag.html
+++ b/deps/npm/html/partial/doc/cli/npm-tag.html
@@ -2,6 +2,7 @@
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm tag &lt;name&gt;@&lt;version&gt; [&lt;tag&gt;]
</code></pre><h2 id="description">DESCRIPTION</h2>
+<p>THIS COMMAND IS DEPRECATED. See <a href="../cli/npm-dist-tag.html">npm-dist-tag(1)</a> for details.</p>
<p>Tags the specified version of the package with the specified tag, or the
<code>--tag</code> config if not specified.</p>
<p>A tag can be used when installing packages as a reference to a version instead
diff --git a/deps/npm/html/partial/doc/cli/npm.html b/deps/npm/html/partial/doc/cli/npm.html
index 9410dfdea1..e8178c2462 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.3.0</p>
+<p>2.5.1</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;&#x61;&#x69;&#x6c;&#x74;&#111;&#x3a;&#x6e;&#112;&#109;&#45;&#64;&#x67;&#x6f;&#x6f;&#x67;&#108;&#101;&#x67;&#x72;&#x6f;&#117;&#x70;&#115;&#x2e;&#99;&#111;&#x6d;">&#x6e;&#112;&#109;&#45;&#64;&#x67;&#x6f;&#x6f;&#x67;&#108;&#101;&#x67;&#x72;&#x6f;&#117;&#x70;&#115;&#x2e;&#99;&#111;&#x6d;</a></li>
+<li><a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#111;&#x3a;&#x6e;&#x70;&#109;&#x2d;&#64;&#103;&#111;&#x6f;&#x67;&#108;&#101;&#x67;&#x72;&#111;&#x75;&#x70;&#x73;&#46;&#99;&#111;&#x6d;">&#x6e;&#x70;&#109;&#x2d;&#64;&#103;&#111;&#x6f;&#x67;&#108;&#101;&#x67;&#x72;&#111;&#x75;&#x70;&#x73;&#46;&#99;&#111;&#x6d;</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="&#x6d;&#97;&#105;&#x6c;&#116;&#x6f;&#58;&#x6e;&#x70;&#x6d;&#45;&#x40;&#103;&#111;&#x6f;&#x67;&#x6c;&#x65;&#x67;&#x72;&#111;&#117;&#112;&#115;&#46;&#99;&#x6f;&#109;">&#x6e;&#x70;&#x6d;&#45;&#x40;&#103;&#111;&#x6f;&#x67;&#x6c;&#x65;&#x67;&#x72;&#111;&#117;&#112;&#115;&#46;&#99;&#x6f;&#109;</a></li>
+<a href="&#x6d;&#x61;&#x69;&#108;&#116;&#111;&#58;&#x6e;&#112;&#109;&#x2d;&#x40;&#x67;&#111;&#x6f;&#103;&#x6c;&#x65;&#103;&#x72;&#111;&#x75;&#112;&#x73;&#x2e;&#x63;&#111;&#x6d;">&#x6e;&#112;&#109;&#x2d;&#x40;&#x67;&#111;&#x6f;&#103;&#x6c;&#x65;&#103;&#x72;&#111;&#x75;&#112;&#x73;&#x2e;&#x63;&#111;&#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="&#109;&#x61;&#105;&#x6c;&#x74;&#111;&#58;&#105;&#64;&#x69;&#x7a;&#x73;&#46;&#x6d;&#101;">&#105;&#64;&#x69;&#x7a;&#x73;&#46;&#x6d;&#101;</a></p>
+<a href="&#109;&#x61;&#x69;&#108;&#116;&#111;&#58;&#105;&#64;&#105;&#122;&#x73;&#x2e;&#x6d;&#x65;">&#105;&#64;&#105;&#122;&#x73;&#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 95f26c6eeb..cc2b12a5ea 100644
--- a/deps/npm/html/partial/doc/files/npm-json.html
+++ b/deps/npm/html/partial/doc/files/npm-json.html
@@ -325,7 +325,7 @@ a specific interface, expected and specified by the host documentation.</p>
<p>For example:</p>
<pre><code>{
&quot;name&quot;: &quot;tea-latte&quot;,
- &quot;version&quot;: &quot;1.3.5&quot;
+ &quot;version&quot;: &quot;1.3.5&quot;,
&quot;peerDependencies&quot;: {
&quot;tea&quot;: &quot;2.x&quot;
}
diff --git a/deps/npm/html/partial/doc/files/package.json.html b/deps/npm/html/partial/doc/files/package.json.html
index 95f26c6eeb..cc2b12a5ea 100644
--- a/deps/npm/html/partial/doc/files/package.json.html
+++ b/deps/npm/html/partial/doc/files/package.json.html
@@ -325,7 +325,7 @@ a specific interface, expected and specified by the host documentation.</p>
<p>For example:</p>
<pre><code>{
&quot;name&quot;: &quot;tea-latte&quot;,
- &quot;version&quot;: &quot;1.3.5&quot;
+ &quot;version&quot;: &quot;1.3.5&quot;,
&quot;peerDependencies&quot;: {
&quot;tea&quot;: &quot;2.x&quot;
}
diff --git a/deps/npm/html/partial/doc/index.html b/deps/npm/html/partial/doc/index.html
index 4fb98e1bd6..2d23cb50cc 100644
--- a/deps/npm/html/partial/doc/index.html
+++ b/deps/npm/html/partial/doc/index.html
@@ -5,6 +5,8 @@
<p>Using npm on the command line</p>
<h3 id="npm-1-"><a href="cli/npm.html">npm(1)</a></h3>
<p>javascript package manager</p>
+<h3 id="npm-access-1-"><a href="cli/npm-access.html">npm-access(1)</a></h3>
+<p>Set access level on published packages</p>
<h3 id="npm-adduser-1-"><a href="cli/npm-adduser.html">npm-adduser(1)</a></h3>
<p>Add a registry user account</p>
<h3 id="npm-bin-1-"><a href="cli/npm-bin.html">npm-bin(1)</a></h3>
@@ -25,6 +27,8 @@
<p>Reduce duplication</p>
<h3 id="npm-deprecate-1-"><a href="cli/npm-deprecate.html">npm-deprecate(1)</a></h3>
<p>Deprecate a version of a package</p>
+<h3 id="npm-dist-tag-1-"><a href="cli/npm-dist-tag.html">npm-dist-tag(1)</a></h3>
+<p>Modify package distribution tags</p>
<h3 id="npm-docs-1-"><a href="cli/npm-docs.html">npm-docs(1)</a></h3>
<p>Docs for a package in a web browser maybe</p>
<h3 id="npm-edit-1-"><a href="cli/npm-edit.html">npm-edit(1)</a></h3>
diff --git a/deps/npm/html/partial/doc/misc/npm-config.html b/deps/npm/html/partial/doc/misc/npm-config.html
index 1dcbc237cc..48f179b435 100644
--- a/deps/npm/html/partial/doc/misc/npm-config.html
+++ b/deps/npm/html/partial/doc/misc/npm-config.html
@@ -42,7 +42,6 @@ defaults if nothing else is specified.</p>
<li><code>-m</code>: <code>--message</code></li>
<li><code>-p</code>, <code>--porcelain</code>: <code>--parseable</code></li>
<li><code>-reg</code>: <code>--registry</code></li>
-<li><code>-v</code>: <code>--version</code></li>
<li><code>-f</code>: <code>--force</code></li>
<li><code>-desc</code>: <code>--description</code></li>
<li><code>-S</code>: <code>--save</code></li>
@@ -81,6 +80,15 @@ this:</p>
<pre><code>npm config set foo:port 80
</code></pre><p>See <a href="../files/package.json.html">package.json(5)</a> for more information.</p>
<h2 id="config-settings">Config Settings</h2>
+<h3 id="access">access</h3>
+<ul>
+<li>Default: <code>restricted</code></li>
+<li>Type: Access</li>
+</ul>
+<p>When publishing scoped packages, the access level defaults to <code>restricted</code>. If
+you want your scoped package to be publicly viewable (and installable) set
+<code>--access=public</code>. The only valid values for <code>access</code> are <code>public</code> and
+<code>restricted</code>. Unscoped packages <em>always</em> have an access level of <code>public</code>.</p>
<h3 id="always-auth">always-auth</h3>
<ul>
<li>Default: false</li>
@@ -354,7 +362,7 @@ for more information, or <a href="../cli/npm-init.html">npm-init(1)</a>.</p>
<p>The value <code>npm init</code> should use by default for the package license.</p>
<h3 id="init-version">init-version</h3>
<ul>
-<li>Default: &quot;0.0.0&quot;</li>
+<li>Default: &quot;1.0.0&quot;</li>
<li>Type: semver</li>
</ul>
<p>The value that <code>npm init</code> should use by default for the package
@@ -572,7 +580,7 @@ optionalDependencies.</p>
</ul>
<p>Configure how versions of packages installed to a package.json file via
<code>--save</code> or <code>--save-dev</code> get prefixed.</p>
-<p>For example if a package has version <code>1.2.3</code>, by default it&#39;s version is
+<p>For example if a package has version <code>1.2.3</code>, by default its version is
set to <code>^1.2.3</code> which allows minor upgrades for that package, but after
<code>npm config set save-prefix=&#39;~&#39;</code> it would be set to <code>~1.2.3</code> which only allows
patch upgrades.</p>
@@ -738,7 +746,6 @@ exit successfully.</p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-config.html">npm-config(1)</a></li>
-<li><a href="../misc/npm-config.html">npm-config(7)</a></li>
<li><a href="../files/npmrc.html">npmrc(5)</a></li>
<li><a href="../misc/npm-scripts.html">npm-scripts(7)</a></li>
<li><a href="../files/npm-folders.html">npm-folders(5)</a></li>
diff --git a/deps/npm/html/partial/doc/misc/npm-disputes.html b/deps/npm/html/partial/doc/misc/npm-disputes.html
index ab322741a7..4d64370a00 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="&#109;&#x61;&#x69;&#x6c;&#x74;&#x6f;&#x3a;&#115;&#117;&#x70;&#x70;&#x6f;&#x72;&#116;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;">&#115;&#117;&#x70;&#x70;&#x6f;&#x72;&#116;&#64;&#110;&#x70;&#x6d;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;</a></li>
+<li>Email the author, CC <a href="&#109;&#x61;&#105;&#x6c;&#x74;&#x6f;&#58;&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#109;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#x73;&#117;&#112;&#112;&#111;&#114;&#116;&#x40;&#x6e;&#x70;&#109;&#106;&#115;&#x2e;&#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="&#x6d;&#x61;&#x69;&#x6c;&#x74;&#111;&#58;&#115;&#117;&#x70;&#112;&#111;&#114;&#x74;&#64;&#110;&#x70;&#109;&#x6a;&#x73;&#46;&#x63;&#111;&#x6d;">&#115;&#117;&#x70;&#112;&#111;&#114;&#x74;&#64;&#110;&#x70;&#109;&#x6a;&#x73;&#46;&#x63;&#111;&#x6d;</a> to the CC list of
+adds the npm support staff <a href="&#109;&#x61;&#105;&#108;&#x74;&#111;&#x3a;&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#99;&#x6f;&#x6d;">&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#x40;&#x6e;&#112;&#109;&#x6a;&#115;&#46;&#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;&#116;&#x6f;&#58;&#115;&#x75;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#112;&#x6d;&#106;&#115;&#x2e;&#99;&#111;&#x6d;">&#115;&#x75;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#112;&#x6d;&#106;&#115;&#x2e;&#99;&#111;&#x6d;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
+<a href="&#109;&#x61;&#105;&#x6c;&#116;&#x6f;&#x3a;&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#111;&#109;">&#x73;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#x6e;&#x70;&#109;&#106;&#x73;&#x2e;&#99;&#111;&#109;</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 a015b73831..a81ae02bd2 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;&#97;&#x69;&#x6c;&#116;&#x6f;&#58;&#115;&#x75;&#x70;&#112;&#111;&#114;&#x74;&#64;&#110;&#x70;&#x6d;&#106;&#115;&#x2e;&#x63;&#111;&#x6d;">&#115;&#x75;&#x70;&#112;&#111;&#114;&#x74;&#64;&#110;&#x70;&#x6d;&#106;&#115;&#x2e;&#x63;&#111;&#x6d;</a>
+<p>If the registry IS down, let us know by emailing <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#x6f;&#x3a;&#115;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#64;&#x6e;&#x70;&#x6d;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;">&#115;&#x75;&#112;&#x70;&#111;&#114;&#x74;&#64;&#x6e;&#x70;&#x6d;&#106;&#115;&#x2e;&#99;&#x6f;&#x6d;</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/html/partial/doc/misc/npm-index.html b/deps/npm/html/partial/doc/misc/npm-index.html
index eab0753c9e..c42ca682cc 100644
--- a/deps/npm/html/partial/doc/misc/npm-index.html
+++ b/deps/npm/html/partial/doc/misc/npm-index.html
@@ -5,6 +5,8 @@
<p>Using npm on the command line</p>
<h3 id="npm-1-"><a href="../cli/npm.html">npm(1)</a></h3>
<p>javascript package manager</p>
+<h3 id="npm-access-1-"><a href="../cli/npm-access.html">npm-access(1)</a></h3>
+<p>Set access level on published packages</p>
<h3 id="npm-adduser-1-"><a href="../cli/npm-adduser.html">npm-adduser(1)</a></h3>
<p>Add a registry user account</p>
<h3 id="npm-bin-1-"><a href="../cli/npm-bin.html">npm-bin(1)</a></h3>
@@ -25,6 +27,8 @@
<p>Reduce duplication</p>
<h3 id="npm-deprecate-1-"><a href="../cli/npm-deprecate.html">npm-deprecate(1)</a></h3>
<p>Deprecate a version of a package</p>
+<h3 id="npm-dist-tag-1-"><a href="../cli/npm-dist-tag.html">npm-dist-tag(1)</a></h3>
+<p>Modify package distribution tags</p>
<h3 id="npm-docs-1-"><a href="../cli/npm-docs.html">npm-docs(1)</a></h3>
<p>Docs for a package in a web browser maybe</p>
<h3 id="npm-edit-1-"><a href="../cli/npm-edit.html">npm-edit(1)</a></h3>
diff --git a/deps/npm/lib/access.js b/deps/npm/lib/access.js
new file mode 100644
index 0000000000..a479a971c3
--- /dev/null
+++ b/deps/npm/lib/access.js
@@ -0,0 +1,123 @@
+var assert = require("assert")
+var resolve = require("path").resolve
+var url = require("url")
+
+var log = require("npmlog")
+var readPackageJson = require("read-package-json")
+
+var mapToRegistry = require("./utils/map-to-registry.js")
+var npa = require("npm-package-arg")
+var npm = require("./npm.js")
+
+module.exports = access
+
+access.usage = "npm access public [<package>]"
+ + "\nnpm access restricted [<package>]"
+ + "\nnpm access add <read-only|read-write> <entity> [<package>]"
+ + "\nnpm access rm <entity> [<package>]"
+ + "\nnpm access ls [<package>]"
+ + "\nnpm access edit [<package>]"
+
+access.completion = function (opts, cb) {
+ var argv = opts.conf.argv.remain
+ if (argv.length === 2) {
+ return cb(null, ["public", "restricted", "add", "rm", "ls", "edit"])
+ }
+
+ switch (argv[2]) {
+ case "public":
+ case "restricted":
+ case "ls":
+ case "edit":
+ return cb(new Error("unimplemented: packages you can change"))
+ case "add":
+ if (argv.length === 3) return cb(null, ["read-only", "read-write"])
+
+ return cb(new Error("unimplemented: entities and packages"))
+ case "rm":
+ return cb(new Error("unimplemented: entities and packages"))
+ default:
+ return cb(new Error(argv[2]+" not recognized"))
+ }
+}
+
+function access (args, cb) {
+ var cmd = args.shift()
+ switch (cmd) {
+ case "public": case "restricted": return changeAccess(args, cmd, cb)
+ case "add": case "set": return add(args, cb)
+ case "rm": case "del": case "clear": return rm(args, cb)
+ case "list": case "sl": case "ls": return ls(args, cb)
+ case "edit": case "ed": return edit(args, cb)
+ default: return cb("Usage:\n"+access.usage)
+ }
+}
+
+function changeAccess (args, level, cb) {
+ assert(Array.isArray(args), "changeAccess requires args be an array")
+ assert(
+ ["public", "restricted"].indexOf(level) !== -1,
+ "access level must be either 'public' or 'restricted'"
+ )
+ assert(typeof cb === "function", "changeAccess requires a callback")
+
+ var p = (args.shift() || "").trim()
+ if (!p) return getCurrentPackage(level, cb)
+ changeAccess_(p, level, cb)
+}
+
+function getCurrentPackage (level, cb) {
+ var here = resolve(npm.prefix, "package.json")
+ log.verbose("setPackageLevel", "here", here)
+
+ readPackageJson(here, function (er, data) {
+ if (er) return cb(er)
+
+ if (!data.name) {
+ return cb(new Error("Package must be named"))
+ }
+
+ changeAccess_(data.name, level, cb)
+ })
+}
+
+function changeAccess_ (name, level, cb) {
+ log.verbose("changeAccess", "name", name, "level", level)
+ mapToRegistry(name, npm.config, function (er, uri, auth, base) {
+ if (er) return cb(er)
+
+ var data = npa(name)
+ if (!data.scope) {
+ var msg = "Sorry, you can't change the access level of unscoped packages."
+ log.error("access", msg)
+ return cb(new Error(msg))
+ }
+
+ // name must be scoped, so escape separator
+ name = name.replace("/", "%2f")
+ // FIXME: mapToRegistry still isn't generic enough SIGH
+ uri = url.resolve(base, "-/package/"+name+"/access")
+ var params = {
+ level : level,
+ auth : auth
+ }
+
+ npm.registry.access(uri, params, cb)
+ })
+}
+
+function add (args, cb) {
+ return cb(new Error("npm access add isn't implemented yet!"))
+}
+
+function rm (args, cb) {
+ return cb(new Error("npm access rm isn't implemented yet!"))
+}
+
+function ls (args, cb) {
+ return cb(new Error("npm access ls isn't implemented yet!"))
+}
+
+function edit (args, cb) {
+ return cb(new Error("npm edit ls isn't implemented yet!"))
+}
diff --git a/deps/npm/lib/cache/caching-client.js b/deps/npm/lib/cache/caching-client.js
index 459a236f55..ec8eb8e16c 100644
--- a/deps/npm/lib/cache/caching-client.js
+++ b/deps/npm/lib/cache/caching-client.js
@@ -24,6 +24,7 @@ function CachingRegistryClient (config) {
// swizzle in our custom cache invalidation logic
this._request = this.request
this.request = this._invalidatingRequest
+ this.get = get
}
inherits(CachingRegistryClient, RegistryClient)
@@ -42,7 +43,7 @@ CachingRegistryClient.prototype._invalidatingRequest = function (uri, params, cb
// thinking that it didn't work when it did.
// Note that failure is an acceptable option here, since the only
// result will be a stale cache for some helper commands.
- client.log.verbose("request", "invalidating", invalidated, "on", method)
+ log.verbose("request", "invalidating", invalidated, "on", method)
return rimraf(invalidated, function () {
cb.apply(undefined, args)
})
@@ -52,7 +53,7 @@ CachingRegistryClient.prototype._invalidatingRequest = function (uri, params, cb
})
}
-CachingRegistryClient.prototype.get = function get (uri, params, cb) {
+function get (uri, params, cb) {
assert(typeof uri === "string", "must pass registry URI to get")
assert(params && typeof params === "object", "must pass params to get")
assert(typeof cb === "function", "must pass callback to get")
@@ -68,7 +69,10 @@ CachingRegistryClient.prototype.get = function get (uri, params, cb) {
// If the GET is part of a write operation (PUT or DELETE), then
// skip past the cache entirely, but still save the results.
- if (uri.match(/\?write=true$/)) return get_.call(this, uri, cachePath, params, cb)
+ if (uri.match(/\?write=true$/)) {
+ log.verbose("get", "GET as part of write; not caching result")
+ return get_.call(this, uri, cachePath, params, cb)
+ }
var client = this
fs.stat(cachePath, function (er, stat) {
@@ -170,6 +174,7 @@ function get_ (uri, cachePath, params, cb) {
}
function saveToCache (cachePath, data, saved) {
+ log.verbose("get", "saving", data.name, "to", cachePath)
getCacheStat(function (er, st) {
mkdirp(path.dirname(cachePath), function (er, made) {
if (er) return saved()
diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js
index 3d99ab86fa..a46e74b5ba 100644
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -24,7 +24,7 @@ try {
exports.Umask = Umask
function Umask () {}
function validateUmask (data, k, val) {
- return umask.validate (data, k, val)
+ return umask.validate(data, k, val)
}
function validateSemver (data, k, val) {
@@ -119,7 +119,9 @@ Object.defineProperty(exports, "defaults", {get: function () {
}
defaults = {
- "always-auth" : false
+ access : null
+ , "always-auth" : false
+
, "bin-links" : true
, browser : null
@@ -228,7 +230,8 @@ Object.defineProperty(exports, "defaults", {get: function () {
}})
exports.types =
- { "always-auth" : Boolean
+ { access : [null, "restricted", "public"]
+ , "always-auth" : Boolean
, "bin-links": Boolean
, browser : [null, String]
, ca: [null, String, Array]
@@ -272,7 +275,7 @@ exports.types =
// local-address must be listed as an IP for a local network interface
// must be IPv4 due to node bug
, "local-address" : getLocalAddresses()
- , loglevel : ["silent","error","warn","http","info","verbose","silly"]
+ , loglevel : ["silent", "error", "warn", "http", "info", "verbose", "silly"]
, logstream : Stream
, long : Boolean
, message: String
@@ -284,7 +287,7 @@ exports.types =
, prefix: path
, production: Boolean
, "proprietary-attribs": Boolean
- , proxy : [null, url]
+ , proxy : [null, false, url] // allow proxy to be disabled explicitly
, "rebuild-bundle" : Boolean
, registry : [null, url]
, rollback : Boolean
diff --git a/deps/npm/lib/dist-tag.js b/deps/npm/lib/dist-tag.js
new file mode 100644
index 0000000000..48b40202f9
--- /dev/null
+++ b/deps/npm/lib/dist-tag.js
@@ -0,0 +1,151 @@
+module.exports = distTag
+
+var log = require("npmlog")
+var npa = require("npm-package-arg")
+var semver = require("semver")
+
+var npm = require("./npm.js")
+var mapToRegistry = require("./utils/map-to-registry.js")
+var readLocalPkg = require("./utils/read-local-package.js")
+
+distTag.usage = "npm dist-tag add <pkg>@<version> [<tag>]"
+ + "\nnpm dist-tag rm <pkg> <tag>"
+ + "\nnpm dist-tag ls [<pkg>]"
+
+distTag.completion = function (opts, cb) {
+ var argv = opts.conf.argv.remain
+ if (argv.length === 2) {
+ return cb(null, ["add", "rm", "ls"])
+ }
+
+ switch (argv[2]) {
+ default:
+ return cb()
+ }
+}
+
+function distTag (args, cb) {
+ var cmd = args.shift()
+ switch (cmd) {
+ case "add": case "a": case "set": case "s":
+ return add(args[0], args[1], cb)
+ case "rm": case "r": case "del": case "d": case "remove":
+ return remove(args[1], args[0], cb)
+ case "ls": case "l": case "sl": case "list":
+ return list(args[0], cb)
+ default:
+ return cb("Usage:\n"+distTag.usage)
+ }
+}
+
+function add (spec, tag, cb) {
+ var thing = npa(spec || "")
+ var pkg = thing.name
+ var version = thing.rawSpec
+ var t = (tag || npm.config.get("tag")).trim()
+
+ log.verbose("dist-tag add", t, "to", pkg+"@"+version)
+
+ if (!pkg || !version || !t) return cb("Usage:\n"+distTag.usage)
+
+ if (semver.validRange(t)) {
+ var er = new Error("Tag name must not be a valid SemVer range: " + t)
+ return cb(er)
+ }
+
+ fetchTags(pkg, function (er, tags) {
+ if (er) return cb(er)
+
+ if (tags[t] === version) {
+ log.warn("dist-tag add", t, "is already set to version", version)
+ return cb()
+ }
+ tags[t] = version
+
+ mapToRegistry(pkg, npm.config, function (er, uri, auth, base) {
+ var params = {
+ package : pkg,
+ distTag : t,
+ version : version,
+ auth : auth
+ }
+
+ npm.registry.distTags.add(base, params, function (er) {
+ if (er) return cb(er)
+
+ console.log("+"+t+": "+pkg+"@"+version)
+ cb()
+ })
+ })
+ })
+}
+
+function remove (tag, pkg, cb) {
+ log.verbose("dist-tag del", tag, "from", pkg)
+
+ fetchTags(pkg, function (er, tags) {
+ if (er) return cb(er)
+
+ if (!tags[tag]) {
+ log.info("dist-tag del", tag, "is not a dist-tag on", pkg)
+ return cb(new Error(tag+" is not a dist-tag on "+pkg))
+ }
+
+ var version = tags[tag]
+ delete tags[tag]
+
+ mapToRegistry(pkg, npm.config, function (er, uri, auth, base) {
+ var params = {
+ package : pkg,
+ distTag : tag,
+ auth : auth
+ }
+
+ npm.registry.distTags.rm(base, params, function (er) {
+ if (er) return cb(er)
+
+ console.log("-"+tag+": "+pkg+"@"+version)
+ cb()
+ })
+ })
+ })
+}
+
+function list (pkg, cb) {
+ if (!pkg) return readLocalPkg(function (er, pkg) {
+ if (er) return cb(er)
+ if (!pkg) return cb(distTag.usage)
+ list(pkg, cb)
+ })
+
+ fetchTags(pkg, function (er, tags) {
+ if (er) {
+ log.error("dist-tag ls", "Couldn't get dist-tag data for", pkg)
+ return cb(er)
+ }
+ var msg = Object.keys(tags).map(function (k) {
+ return k+": "+tags[k]
+ }).sort().join("\n")
+ console.log(msg)
+ cb(er, tags)
+ })
+}
+
+function fetchTags (pkg, cb) {
+ mapToRegistry(pkg, npm.config, function (er, uri, auth, base) {
+ if (er) return cb(er)
+
+ var params = {
+ package : pkg,
+ auth : auth
+ }
+ npm.registry.distTags.fetch(base, params, function (er, tags) {
+ if (er) return cb(er)
+ if (!tags || !Object.keys(tags).length) {
+ return cb(new Error("No dist-tags found for " + pkg))
+ }
+
+ cb(null, tags)
+ })
+ })
+}
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index d03ec47b6b..8077e8ac99 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -67,6 +67,7 @@ var commandCache = {}
, "isntall" : "install"
, "up" : "update"
, "c" : "config"
+ , "dist-tags" : "dist-tag"
, "info" : "view"
, "show" : "view"
, "find" : "search"
@@ -111,6 +112,7 @@ var commandCache = {}
, "adduser"
, "unpublish"
, "owner"
+ , "access"
, "deprecate"
, "shrinkwrap"
@@ -131,6 +133,7 @@ var commandCache = {}
, "prefix"
, "bin"
, "whoami"
+ , "dist-tag"
, "test"
, "stop"
diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js
index fe25a8e910..f69d81550a 100644
--- a/deps/npm/lib/outdated.js
+++ b/deps/npm/lib/outdated.js
@@ -35,6 +35,7 @@ var path = require("path")
, mapToRegistry = require("./utils/map-to-registry.js")
, npa = require("npm-package-arg")
, readInstalled = require("read-installed")
+ , long = npm.config.get("long")
function outdated (args, silent, cb) {
if (typeof cb !== "function") cb = silent, silent = false
@@ -47,12 +48,14 @@ function outdated (args, silent, cb) {
console.log(makeParseable(list))
} else {
var outList = list.map(makePretty)
- var outTable = [[ "Package"
- , "Current"
- , "Wanted"
- , "Latest"
- , "Location"
- ]].concat(outList)
+ var outHead = [ "Package"
+ , "Current"
+ , "Wanted"
+ , "Latest"
+ , "Location"
+ ]
+ if (long) outHead.push("Package Type")
+ var outTable = [outHead].concat(outList)
if (npm.color) {
outTable[0] = outTable[0].map(function(heading) {
@@ -69,13 +72,14 @@ function outdated (args, silent, cb) {
})
}
-// [[ dir, dep, has, want, latest ]]
+// [[ dir, dep, has, want, latest, type ]]
function makePretty (p) {
var dep = p[1]
, dir = path.resolve(p[0], "node_modules", dep)
, has = p[2]
, want = p[3]
, latest = p[4]
+ , type = p[6]
if (!npm.config.get("global")) {
dir = path.relative(process.cwd(), dir)
@@ -87,12 +91,14 @@ function makePretty (p) {
, latest
, dirToPrettyLocation(dir)
]
+ if (long) columns[5] = type
if (npm.color) {
columns[0] = color[has === want ? "yellow" : "red"](columns[0]) // dep
columns[2] = color.green(columns[2]) // want
columns[3] = color.magenta(columns[3]) // latest
columns[4] = color.brightBlack(columns[4]) // dir
+ if (long) columns[5] = color.brightBlack(columns[5]) // type
}
return columns
@@ -111,17 +117,22 @@ function dirToPrettyLocation (dir) {
function makeParseable (list) {
return list.map(function (p) {
+
var dep = p[1]
, dir = path.resolve(p[0], "node_modules", dep)
, has = p[2]
, want = p[3]
, latest = p[4]
+ , type = p[6]
- return [ dir
+ var out = [ dir
, dep + "@" + want
, (has ? (dep + "@" + has) : "MISSING")
, dep + "@" + latest
- ].join(":")
+ ]
+ if (long) out.push(type)
+
+ return out.join(":")
}).join(os.EOL)
}
@@ -137,6 +148,7 @@ function makeJSON (list) {
, latest: p[4]
, location: dir
}
+ if (long) out[p[1]].type = p[6]
})
return JSON.stringify(out, null, 2)
}
@@ -154,13 +166,23 @@ function outdated_ (args, dir, parentHas, depth, cb) {
return cb(null, [])
}
var deps = null
+ var types = {}
readJson(path.resolve(dir, "package.json"), function (er, d) {
d = d || {}
if (er && er.code !== "ENOENT" && er.code !== "ENOTDIR") return cb(er)
deps = (er) ? true : (d.dependencies || {})
+ if (!er) {
+ Object.keys(deps).forEach(function (k) {
+ types[k] = "dependencies"
+ })
+ }
if (npm.config.get("save-dev")) {
deps = d.devDependencies || {}
+ Object.keys(deps).forEach(function (k) {
+ types[k] = "devDependencies"
+ })
+
return next()
}
@@ -174,6 +196,9 @@ function outdated_ (args, dir, parentHas, depth, cb) {
if (npm.config.get("save-optional")) {
deps = d.optionalDependencies || {}
+ Object.keys(deps).forEach(function (k) {
+ types[k] = "optionalDependencies"
+ })
return next()
}
@@ -186,6 +211,7 @@ function outdated_ (args, dir, parentHas, depth, cb) {
Object.keys(d.devDependencies || {}).forEach(function (k) {
if (!(k in parentHas)) {
deps[k] = d.devDependencies[k]
+ types[k] = "devDependencies"
}
})
}
@@ -236,12 +262,14 @@ function outdated_ (args, dir, parentHas, depth, cb) {
// if has[dep] !== shouldHave[dep], then cb with the data
// otherwise dive into the folder
asyncMap(Object.keys(deps), function (dep, cb) {
- shouldUpdate(args, dir, dep, has, deps[dep], depth, cb)
+ if (!long) return shouldUpdate(args, dir, dep, has, deps[dep], depth, cb)
+
+ shouldUpdate(args, dir, dep, has, deps[dep], depth, cb, types[dep])
}, cb)
}
}
-function shouldUpdate (args, dir, dep, has, req, depth, cb) {
+function shouldUpdate (args, dir, dep, has, req, depth, cb, type) {
// look up the most recent version.
// if that's what we already have, or if it's not on the args list,
// then dive into it. Otherwise, cb() with the data.
@@ -260,15 +288,14 @@ function shouldUpdate (args, dir, dep, has, req, depth, cb) {
}
function doIt (wanted, latest) {
- cb(null, [[ dir, dep, curr && curr.version, wanted, latest, req ]])
- }
-
- if (args.length && args.indexOf(dep) === -1) {
- return skip()
+ if (!long) {
+ return cb(null, [[ dir, dep, curr && curr.version, wanted, latest, req]])
+ }
+ cb(null, [[ dir, dep, curr && curr.version, wanted, latest, req, type]])
}
- if (npa(req).type === "git")
- return doIt("git", "git")
+ if (args.length && args.indexOf(dep) === -1) return skip()
+ if (npa(req).type === "git") return doIt("git", "git")
// search for the latest package
mapToRegistry(dep, npm.config, function (er, uri, auth) {
@@ -318,10 +345,12 @@ function shouldUpdate (args, dir, dep, has, req, depth, cb) {
if (!curr || dFromUrl && cFromUrl && d._from !== curr.from
|| d.version !== curr.version
- || d.version !== l.version)
+ || d.version !== l.version) {
doIt(d.version, l.version)
- else
+ }
+ else {
skip()
+ }
}
}
}
diff --git a/deps/npm/lib/owner.js b/deps/npm/lib/owner.js
index 7b34508337..3d33a932a3 100644
--- a/deps/npm/lib/owner.js
+++ b/deps/npm/lib/owner.js
@@ -6,8 +6,8 @@ owner.usage = "npm owner add <username> <pkg>"
var npm = require("./npm.js")
, log = require("npmlog")
- , readJson = require("read-package-json")
, mapToRegistry = require("./utils/map-to-registry.js")
+ , readLocalPkg = require("./utils/read-local-package.js")
owner.completion = function (opts, cb) {
var argv = opts.conf.argv.remain
@@ -252,14 +252,6 @@ function mutate (pkg, user, mutation, cb) {
}
}
-function readLocalPkg (cb) {
- if (npm.config.get("global")) return cb()
- var path = require("path")
- readJson(path.resolve(npm.prefix, "package.json"), function (er, d) {
- return cb(er, d && d.name)
- })
-}
-
function unknown (action, cb) {
cb("Usage: \n" + owner.usage)
}
diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js
index f179bd4222..06a3404af9 100644
--- a/deps/npm/lib/publish.js
+++ b/deps/npm/lib/publish.js
@@ -12,6 +12,7 @@ var npm = require("./npm.js")
, mapToRegistry = require("./utils/map-to-registry.js")
, cachedPackageRoot = require("./cache/cached-package-root.js")
, createReadStream = require("graceful-fs").createReadStream
+ , npa = require("npm-package-arg")
publish.usage = "npm publish <tarball>"
+ "\nnpm publish <folder>"
@@ -121,6 +122,16 @@ function publish_ (arg, data, isRetry, cachedir, cb) {
auth : auth
}
+ // registry-frontdoor cares about the access level, which is only
+ // configurable for scoped packages
+ if (config.get("access")) {
+ if (!npa(data.name).scope && config.get("access") === "restricted") {
+ return cb(new Error("Can't restrict access to unscoped packages."))
+ }
+
+ params.access = config.get("access")
+ }
+
registry.publish(registryBase, params, function (er) {
if (er && er.code === "EPUBLISHCONFLICT" &&
npm.config.get("force") && !isRetry) {
diff --git a/deps/npm/lib/tag.js b/deps/npm/lib/tag.js
index bc7ec91879..75da0b2174 100644
--- a/deps/npm/lib/tag.js
+++ b/deps/npm/lib/tag.js
@@ -9,6 +9,7 @@ var npm = require("./npm.js")
, mapToRegistry = require("./utils/map-to-registry.js")
, npa = require("npm-package-arg")
, semver = require("semver")
+ , log = require("npmlog")
function tag (args, cb) {
var thing = npa(args.shift() || "")
@@ -25,6 +26,8 @@ function tag (args, cb) {
return cb(er)
}
+ log.warn("tag", "This command is deprecated. Use `npm dist-tag` instead.")
+
mapToRegistry(project, npm.config, function (er, uri, auth) {
if (er) return cb(er)
diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js
index df57c5b346..ede8482c40 100644
--- a/deps/npm/lib/unbuild.js
+++ b/deps/npm/lib/unbuild.js
@@ -5,6 +5,7 @@ var readJson = require("read-package-json")
, gentlyRm = require("./utils/gently-rm.js")
, npm = require("./npm.js")
, path = require("path")
+ , isInside = require("path-is-inside")
, lifecycle = require("./utils/lifecycle.js")
, asyncMap = require("slide").asyncMap
, chain = require("slide").chain
@@ -23,11 +24,12 @@ function unbuild_ (silent) { return function (folder, cb_) {
cb_(er, path.relative(npm.root, folder))
}
folder = path.resolve(folder)
+ var base = isInside(folder, npm.prefix) ? npm.prefix : folder
delete build._didBuild[folder]
log.verbose("unbuild", folder.substr(npm.prefix.length + 1))
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, npm.prefix, cb)
+ if (er) return gentlyRm(folder, false, base, cb)
readJson.cache.del(folder)
chain
( [ [lifecycle, pkg, "preuninstall", folder, false, true]
@@ -38,7 +40,7 @@ function unbuild_ (silent) { return function (folder, cb_) {
}
, [rmStuff, pkg, folder]
, [lifecycle, pkg, "postuninstall", folder, false, true]
- , [gentlyRm, folder, false, npm.prefix] ]
+ , [gentlyRm, folder, false, base] ]
, cb )
})
}}
diff --git a/deps/npm/lib/utils/read-local-package.js b/deps/npm/lib/utils/read-local-package.js
new file mode 100644
index 0000000000..ca6d613210
--- /dev/null
+++ b/deps/npm/lib/utils/read-local-package.js
@@ -0,0 +1,12 @@
+exports = module.exports = readLocalPkg
+
+var npm = require("../npm.js")
+ , readJson = require("read-package-json")
+
+function readLocalPkg (cb) {
+ if (npm.config.get("global")) return cb()
+ var path = require("path")
+ readJson(path.resolve(npm.prefix, "package.json"), function (er, d) {
+ return cb(er, d && d.name)
+ })
+}
diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1
index 4f274c5c91..2d82982aef 100644
--- a/deps/npm/man/man1/npm-README.1
+++ b/deps/npm/man/man1/npm-README.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "January 2015" "" ""
+.TH "NPM" "1" "February 2015" "" ""
.SH "NAME"
\fBnpm\fR \- a JavaScript package manager
.P
diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1
index c7620f9a84..2ea011be60 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" "January 2015" "" ""
+.TH "NPM\-ACCESS" "1" "February 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 b3abf17b68..df4372e26d 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" "January 2015" "" ""
+.TH "NPM\-ADDUSER" "1" "February 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 8f0dc2ba57..26d14dfa8c 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" "January 2015" "" ""
+.TH "NPM\-BIN" "1" "February 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 5acca82e2d..94eec9f6ac 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" "January 2015" "" ""
+.TH "NPM\-BUGS" "1" "February 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 1179298c5f..42f084d72c 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" "January 2015" "" ""
+.TH "NPM\-BUILD" "1" "February 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 703c795c9b..4da2943791 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" "January 2015" "" ""
+.TH "NPM\-BUNDLE" "1" "February 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 1cf1d7c717..5ebf49d254 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" "January 2015" "" ""
+.TH "NPM\-CACHE" "1" "February 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 4cb0649100..22110a3b6d 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" "January 2015" "" ""
+.TH "NPM\-COMPLETION" "1" "February 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 716303c41b..0b14aef1f6 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" "January 2015" "" ""
+.TH "NPM\-CONFIG" "1" "February 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 743a5d027d..3ffdf836fe 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" "January 2015" "" ""
+.TH "NPM\-DEDUPE" "1" "February 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 95a8fd2515..d2a6c89397 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" "January 2015" "" ""
+.TH "NPM\-DEPRECATE" "1" "February 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 2ed9a5a778..9707d31b26 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" "January 2015" "" ""
+.TH "NPM\-DIST\-TAG" "1" "February 2015" "" ""
.SH "NAME"
\fBnpm-dist-tag\fR \- Modify package distribution tags
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1
index 1feecc263c..2835d04247 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" "January 2015" "" ""
+.TH "NPM\-DOCS" "1" "February 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 1d905d06b9..c260554e6d 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" "January 2015" "" ""
+.TH "NPM\-EDIT" "1" "February 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 5f29171a9e..527a9f221a 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" "January 2015" "" ""
+.TH "NPM\-EXPLORE" "1" "February 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 524081c930..3c95739336 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" "January 2015" "" ""
+.TH "NPM\-HELP\-SEARCH" "1" "February 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 0d7f1af03c..3a43adc485 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" "January 2015" "" ""
+.TH "NPM\-HELP" "1" "February 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 d2b6a298d5..c145287358 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" "January 2015" "" ""
+.TH "NPM\-INIT" "1" "February 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 ec355effeb..db564b23f5 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" "January 2015" "" ""
+.TH "NPM\-INSTALL" "1" "February 2015" "" ""
.SH "NAME"
\fBnpm-install\fR \- Install a package
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1
index 86132ed1dd..9151b68c0e 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" "January 2015" "" ""
+.TH "NPM\-LINK" "1" "February 2015" "" ""
.SH "NAME"
\fBnpm-link\fR \- Symlink a package folder
.SH SYNOPSIS
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index bbdc916666..4f2d713e2e 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" "January 2015" "" ""
+.TH "NPM\-LS" "1" "February 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.3.0 /path/to/npm
+npm@2.5.1 /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 a1086ad322..002fe8887e 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" "January 2015" "" ""
+.TH "NPM\-OUTDATED" "1" "February 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 1c503795c6..adb6d9d47b 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" "January 2015" "" ""
+.TH "NPM\-OWNER" "1" "February 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 3b39d6847a..b52ee1cf95 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" "January 2015" "" ""
+.TH "NPM\-PACK" "1" "February 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 2ebdaa6777..d22601a16a 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" "January 2015" "" ""
+.TH "NPM\-PREFIX" "1" "February 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 7b22233d5d..31d1c5cc53 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" "January 2015" "" ""
+.TH "NPM\-PRUNE" "1" "February 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 0df825154b..0ffb5284fa 100644
--- a/deps/npm/man/man1/npm-publish.1
+++ b/deps/npm/man/man1/npm-publish.1
@@ -1,12 +1,12 @@
-.TH "NPM\-PUBLISH" "1" "January 2015" "" ""
+.TH "NPM\-PUBLISH" "1" "February 2015" "" ""
.SH "NAME"
\fBnpm-publish\fR \- Publish a package
.SH SYNOPSIS
.P
.RS 2
.nf
-npm publish <tarball> [\-\-tag <tag>]
-npm publish <folder> [\-\-tag <tag>]
+npm publish <tarball> [\-\-tag <tag>] [\-\-access <public|restricted>]
+npm publish <folder> [\-\-tag <tag>] [\-\-access <public|restricted>]
.fi
.RE
.SH DESCRIPTION
@@ -31,6 +31,12 @@ with a package\.json file inside\.
Registers the published package with the given tag, such that \fBnpm install
<name>@<tag>\fR will install this version\. By default, \fBnpm publish\fR updates
and \fBnpm install\fR installs the \fBlatest\fR tag\.
+.IP \(bu 2
+\fB[\-\-access <public|restricted>]\fR
+Tells the registry whether this package should be published as public or
+restricted\. Only applies to scoped packages, which default to \fBrestricted\fR\|\.
+If you don't have a paid account, you must publish with \fB\-\-access public\fR
+to publish scoped packages\.
.RE
.P
@@ -45,6 +51,8 @@ it is removed with npm help unpublish\.
.IP \(bu 2
npm help 7 registry
.IP \(bu 2
+npm help 7 scope
+.IP \(bu 2
npm help adduser
.IP \(bu 2
npm help owner
diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1
index 1bb1e9acb3..b5b89c9423 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" "January 2015" "" ""
+.TH "NPM\-REBUILD" "1" "February 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 da8d6c9ad3..d9cd844134 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" "January 2015" "" ""
+.TH "NPM\-REPO" "1" "February 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 010e815300..a769e212fc 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" "January 2015" "" ""
+.TH "NPM\-RESTART" "1" "February 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 94a0afa733..e2441e445c 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" "January 2015" "" ""
+.TH "NPM\-RM" "1" "February 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 2067f9e55d..43f28d4203 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" "January 2015" "" ""
+.TH "NPM\-ROOT" "1" "February 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 24ff5d9583..879fccad2d 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" "January 2015" "" ""
+.TH "NPM\-RUN\-SCRIPT" "1" "February 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 3f7d19bd8f..316060d12c 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" "January 2015" "" ""
+.TH "NPM\-SEARCH" "1" "February 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 5fa9fb16ee..5d3649e4c3 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" "January 2015" "" ""
+.TH "NPM\-SHRINKWRAP" "1" "February 2015" "" ""
.SH "NAME"
\fBnpm-shrinkwrap\fR \- Lock down dependency versions
.SH SYNOPSIS
@@ -117,7 +117,7 @@ This generates npm\-shrinkwrap\.json, which will look something like this:
"version": "0\.0\.1",
"dependencies": {
"C": {
- "version": "0\.1\.0"
+ "version": "0\.0\.1"
}
}
}
@@ -132,7 +132,7 @@ installs a package with a npm\-shrinkwrap\.json file in the package
root, the shrinkwrap file (rather than package\.json files) completely
drives the installation of that package and all of its dependencies
(recursively)\. So now the author publishes A@0\.1\.0, and subsequent
-installs of this package will use B@0\.0\.1 and C@0\.1\.0, regardless the
+installs of this package will use B@0\.0\.1 and C@0\.0\.1, regardless the
dependencies and versions listed in A's, B's, and C's package\.json
files\.
.SS Using shrinkwrapped packages
diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1
index ced42ecaed..091271293c 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" "January 2015" "" ""
+.TH "NPM\-STAR" "1" "February 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 d2124355c4..8aa6ae2bad 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" "January 2015" "" ""
+.TH "NPM\-STARS" "1" "February 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 36f0c26bc5..574281b500 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" "January 2015" "" ""
+.TH "NPM\-START" "1" "February 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 0a20b4b6d4..f0fb715c6d 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" "January 2015" "" ""
+.TH "NPM\-STOP" "1" "February 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 995ad39907..eb0549e924 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" "January 2015" "" ""
+.TH "NPM\-TAG" "1" "February 2015" "" ""
.SH "NAME"
\fBnpm-tag\fR \- Tag a published version
.SH SYNOPSIS
@@ -10,6 +10,8 @@ npm tag <name>@<version> [<tag>]
.RE
.SH DESCRIPTION
.P
+THIS COMMAND IS DEPRECATED\. See npm help dist\-tag for details\.
+.P
Tags the specified version of the package with the specified tag, or the
\fB\-\-tag\fR config if not specified\.
.P
diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1
index b398e81eaf..c0b873fb0b 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" "January 2015" "" ""
+.TH "NPM\-TEST" "1" "February 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 5568b48371..d79721bfbf 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" "January 2015" "" ""
+.TH "NPM\-RM" "1" "February 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 7f96d4f367..906f63069a 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" "January 2015" "" ""
+.TH "NPM\-UNPUBLISH" "1" "February 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 969909482c..b200ad94c1 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" "January 2015" "" ""
+.TH "NPM\-UPDATE" "1" "February 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 2ae02d0937..bbe6784cd6 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" "January 2015" "" ""
+.TH "NPM\-VERSION" "1" "February 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 0eb7f31185..187c215d6c 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" "January 2015" "" ""
+.TH "NPM\-VIEW" "1" "February 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 b993e0c9b5..fe2af1ec03 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" "January 2015" "" ""
+.TH "NPM\-WHOAMI" "1" "February 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 7b4465aa29..6794269320 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -1,4 +1,4 @@
-.TH "NPM" "1" "January 2015" "" ""
+.TH "NPM" "1" "February 2015" "" ""
.SH "NAME"
\fBnpm\fR \- javascript package manager
.SH SYNOPSIS
@@ -10,7 +10,7 @@ npm <command> [args]
.RE
.SH VERSION
.P
-2.3.0
+2.5.1
.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 27588a2407..667f718804 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" "January 2015" "" ""
+.TH "NPM\-BIN" "3" "February 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 6b7503fefd..eb8eff117a 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" "January 2015" "" ""
+.TH "NPM\-BUGS" "3" "February 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 15a2839cce..88a6c8ca2c 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" "January 2015" "" ""
+.TH "NPM\-CACHE" "3" "February 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 ee757dfce7..e9725c9713 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" "January 2015" "" ""
+.TH "NPM\-COMMANDS" "3" "February 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 be2522cb49..e0f838af91 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" "January 2015" "" ""
+.TH "NPM\-CONFIG" "3" "February 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 d04e25d43f..fbbaa693f6 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" "January 2015" "" ""
+.TH "NPM\-DEPRECATE" "3" "February 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 4dd5a84f7e..d772f53fa8 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" "January 2015" "" ""
+.TH "NPM\-DOCS" "3" "February 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 d7c2ad4f1d..763c78a6ba 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" "January 2015" "" ""
+.TH "NPM\-EDIT" "3" "February 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 8648eac98e..4d55360803 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" "January 2015" "" ""
+.TH "NPM\-EXPLORE" "3" "February 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 a9baaf36d9..68d29f5e4c 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" "January 2015" "" ""
+.TH "NPM\-HELP\-SEARCH" "3" "February 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 9a2ce6bc82..90336149ae 100644
--- a/deps/npm/man/man3/npm-init.3
+++ b/deps/npm/man/man3/npm-init.3
@@ -1,4 +1,4 @@
-.TH "NPM" "" "January 2015" "" ""
+.TH "NPM" "" "February 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 511791791d..b69cbf97b3 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" "January 2015" "" ""
+.TH "NPM\-INSTALL" "3" "February 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 2d5bf77c3c..9db043993e 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" "January 2015" "" ""
+.TH "NPM\-LINK" "3" "February 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 68787c89b1..c5ca93a622 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" "January 2015" "" ""
+.TH "NPM\-LOAD" "3" "February 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 de3d127df6..df41a3ab82 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" "January 2015" "" ""
+.TH "NPM\-LS" "3" "February 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 9e96d44ab3..2efa235859 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" "January 2015" "" ""
+.TH "NPM\-OUTDATED" "3" "February 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 35a993ba8b..238f3c5da7 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" "January 2015" "" ""
+.TH "NPM\-OWNER" "3" "February 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 7d95e57513..13fc83a3a2 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" "January 2015" "" ""
+.TH "NPM\-PACK" "3" "February 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 4aaed71a73..68c9f1042b 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" "January 2015" "" ""
+.TH "NPM\-PREFIX" "3" "February 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 310dfe292e..614a551789 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" "January 2015" "" ""
+.TH "NPM\-PRUNE" "3" "February 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 28f77205c5..cf2be78692 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" "January 2015" "" ""
+.TH "NPM\-PUBLISH" "3" "February 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 082589b5de..b79d99604c 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" "January 2015" "" ""
+.TH "NPM\-REBUILD" "3" "February 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 64cc0bad69..bd0d915a63 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" "January 2015" "" ""
+.TH "NPM\-REPO" "3" "February 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 2cacefc5b1..5c24f61e28 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" "January 2015" "" ""
+.TH "NPM\-RESTART" "3" "February 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 15d5230d17..5c64d99f84 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" "January 2015" "" ""
+.TH "NPM\-ROOT" "3" "February 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 59bf90d965..e87405309d 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" "January 2015" "" ""
+.TH "NPM\-RUN\-SCRIPT" "3" "February 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 4fffa3bd96..895e8ec1e4 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" "January 2015" "" ""
+.TH "NPM\-SEARCH" "3" "February 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 92ce7b1b2f..042e394128 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" "January 2015" "" ""
+.TH "NPM\-SHRINKWRAP" "3" "February 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 f3330a5885..bba1166e4d 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" "January 2015" "" ""
+.TH "NPM\-START" "3" "February 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 551eedbc12..e1e536316b 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" "January 2015" "" ""
+.TH "NPM\-STOP" "3" "February 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 c0092c274f..ef7e8351a3 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" "January 2015" "" ""
+.TH "NPM\-TAG" "3" "February 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 ff969ec023..0e9dfdc41a 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" "January 2015" "" ""
+.TH "NPM\-TEST" "3" "February 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 0cf637ca2c..7920b0188f 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" "January 2015" "" ""
+.TH "NPM\-UNINSTALL" "3" "February 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 48f865db19..17c3228a11 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" "January 2015" "" ""
+.TH "NPM\-UNPUBLISH" "3" "February 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 eee573b2d8..81e86907bc 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" "January 2015" "" ""
+.TH "NPM\-UPDATE" "3" "February 2015" "" ""
.SH "NAME"
\fBnpm-update\fR \- Update a package
.SH SYNOPSIS
@@ -8,7 +8,7 @@
npm\.commands\.update(packages, callback)
.fi
.RE
-.TH "DESCRIPTION" "" "January 2015" "" ""
+.TH "DESCRIPTION" "" "February 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 2cf7fe2153..be5def8555 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" "January 2015" "" ""
+.TH "NPM\-VERSION" "3" "February 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 42bbf40c50..cbd2dae435 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" "January 2015" "" ""
+.TH "NPM\-VIEW" "3" "February 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 cb320ec46a..81cda1b89c 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" "January 2015" "" ""
+.TH "NPM\-WHOAMI" "3" "February 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 1bd3f3890f..8fcfc1ebdc 100644
--- a/deps/npm/man/man3/npm.3
+++ b/deps/npm/man/man3/npm.3
@@ -1,4 +1,4 @@
-.TH "NPM" "3" "January 2015" "" ""
+.TH "NPM" "3" "February 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.3.0
+2.5.1
.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 2ae88d142a..2a945b168c 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" "January 2015" "" ""
+.TH "NPM\-FOLDERS" "5" "February 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 2ae88d142a..2a945b168c 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" "January 2015" "" ""
+.TH "NPM\-FOLDERS" "5" "February 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 d54eaddbe1..e4a928569e 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" "January 2015" "" ""
+.TH "PACKAGE\.JSON" "5" "February 2015" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -522,7 +522,7 @@ For example:
.nf
{
"name": "tea\-latte",
- "version": "1\.3\.5"
+ "version": "1\.3\.5",
"peerDependencies": {
"tea": "2\.x"
}
diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5
index fc2986b901..a6b00e811c 100644
--- a/deps/npm/man/man5/npmrc.5
+++ b/deps/npm/man/man5/npmrc.5
@@ -1,4 +1,4 @@
-.TH "NPMRC" "5" "January 2015" "" ""
+.TH "NPMRC" "5" "February 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 d54eaddbe1..e4a928569e 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" "January 2015" "" ""
+.TH "PACKAGE\.JSON" "5" "February 2015" "" ""
.SH "NAME"
\fBpackage.json\fR \- Specifics of npm's package\.json handling
.SH DESCRIPTION
@@ -522,7 +522,7 @@ For example:
.nf
{
"name": "tea\-latte",
- "version": "1\.3\.5"
+ "version": "1\.3\.5",
"peerDependencies": {
"tea": "2\.x"
}
diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7
index ebaf0386c2..3607b86598 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" "January 2015" "" ""
+.TH "NPM\-CODING\-STYLE" "7" "February 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 b76ec439c5..a712dce1da 100644
--- a/deps/npm/man/man7/npm-config.7
+++ b/deps/npm/man/man7/npm-config.7
@@ -1,4 +1,4 @@
-.TH "NPM\-CONFIG" "7" "January 2015" "" ""
+.TH "NPM\-CONFIG" "7" "February 2015" "" ""
.SH "NAME"
\fBnpm-config\fR \- More than you probably want to know about npm configuration
.SH DESCRIPTION
@@ -70,8 +70,6 @@ The following shorthands are parsed on the command\-line:
.IP \(bu 2
\fB\-reg\fR: \fB\-\-registry\fR
.IP \(bu 2
-\fB\-v\fR: \fB\-\-version\fR
-.IP \(bu 2
\fB\-f\fR: \fB\-\-force\fR
.IP \(bu 2
\fB\-desc\fR: \fB\-\-description\fR
@@ -151,6 +149,19 @@ npm config set foo:port 80
.P
See npm help 5 package\.json for more information\.
.SH Config Settings
+.SS access
+.RS 0
+.IP \(bu 2
+Default: \fBrestricted\fR
+.IP \(bu 2
+Type: Access
+
+.RE
+.P
+When publishing scoped packages, the access level defaults to \fBrestricted\fR\|\. If
+you want your scoped package to be publicly viewable (and installable) set
+\fB\-\-access=public\fR\|\. The only valid values for \fBaccess\fR are \fBpublic\fR and
+\fBrestricted\fR\|\. Unscoped packages \fIalways\fR have an access level of \fBpublic\fR\|\.
.SS always\-auth
.RS 0
.IP \(bu 2
@@ -595,7 +606,7 @@ The value \fBnpm init\fR should use by default for the package license\.
.SS init\-version
.RS 0
.IP \(bu 2
-Default: "0\.0\.0"
+Default: "1\.0\.0"
.IP \(bu 2
Type: semver
@@ -942,7 +953,7 @@ Type: String
Configure how versions of packages installed to a package\.json file via
\fB\-\-save\fR or \fB\-\-save\-dev\fR get prefixed\.
.P
-For example if a package has version \fB1\.2\.3\fR, by default it's version is
+For example if a package has version \fB1\.2\.3\fR, by default its version is
set to \fB^1\.2\.3\fR which allows minor upgrades for that package, but after
\fBnpm config set save\-prefix='~'\fR it would be set to \fB~1\.2\.3\fR which only allows
patch upgrades\.
@@ -1203,8 +1214,6 @@ Set to \fB"browser"\fR to view html help content in the default web browser\.
.IP \(bu 2
npm help config
.IP \(bu 2
-npm help 7 config
-.IP \(bu 2
npm help 5 npmrc
.IP \(bu 2
npm help 7 scripts
diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7
index ba47e45fab..76eda3cde2 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" "January 2015" "" ""
+.TH "NPM\-DEVELOPERS" "7" "February 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 3d67933982..136d670b62 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" "January 2015" "" ""
+.TH "NPM\-DISPUTES" "7" "February 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 cf6a37cfdd..45daad65db 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" "January 2015" "" ""
+.TH "NPM\-FAQ" "7" "February 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 b3608b5777..f9c996fb78 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" "January 2015" "" ""
+.TH "NPM\-INDEX" "7" "February 2015" "" ""
.SH "NAME"
\fBnpm-index\fR \- Index of all npm documentation
.SS npm help README
@@ -10,6 +10,9 @@ Using npm on the command line
.SS npm help npm
.P
javascript package manager
+.SS npm help access
+.P
+Set access level on published packages
.SS npm help adduser
.P
Add a registry user account
@@ -40,6 +43,9 @@ Reduce duplication
.SS npm help deprecate
.P
Deprecate a version of a package
+.SS npm help dist\-tag
+.P
+Modify package distribution tags
.SS npm help docs
.P
Docs for a package in a web browser maybe
diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7
index f89b94507e..8e53a12a55 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" "January 2015" "" ""
+.TH "NPM\-REGISTRY" "7" "February 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 2cae9e88c7..5a32862abb 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" "January 2015" "" ""
+.TH "NPM\-SCOPE" "7" "February 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 69d880d34f..b90484d2f4 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" "January 2015" "" ""
+.TH "NPM\-SCRIPTS" "7" "February 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 73963fe3b3..e3f8b02760 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" "January 2015" "" ""
+.TH "NPM\-REMOVAL" "1" "February 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 bf239f7e62..de6a889185 100644
--- a/deps/npm/man/man7/semver.7
+++ b/deps/npm/man/man7/semver.7
@@ -1,4 +1,4 @@
-.TH "SEMVER" "7" "January 2015" "" ""
+.TH "SEMVER" "7" "February 2015" "" ""
.SH "NAME"
\fBsemver\fR \- The semantic versioner for npm
.SH Usage
diff --git a/deps/npm/node_modules/columnify/Makefile b/deps/npm/node_modules/columnify/Makefile
new file mode 100644
index 0000000000..3ae543a947
--- /dev/null
+++ b/deps/npm/node_modules/columnify/Makefile
@@ -0,0 +1,9 @@
+
+all: columnify.js
+
+prepublish: all
+
+columnify.js: index.js package.json
+ 6to5 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 43ae36c2c4..b2b846f366 100644
--- a/deps/npm/node_modules/columnify/Readme.md
+++ b/deps/npm/node_modules/columnify/Readme.md
@@ -1,6 +1,10 @@
# columnify
[![Build Status](https://travis-ci.org/timoxley/columnify.png?branch=master)](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)
+[![devDependency Status](https://david-dm.org/timoxley/columnify/dev-status.svg)](https://david-dm.org/timoxley/columnify#info=devDependencies)
Create text-based columns suitable for console output from objects or
arrays of objects.
@@ -36,7 +40,6 @@ console.log(columns)
Objects are converted to a list of key/value pairs:
```javascript
-
var data = {
"commander@0.6.1": 1,
"minimatch@0.2.14": 3,
@@ -100,15 +103,58 @@ mod1 0.0.1
module2 0.2.0
```
-### Wrapping Column Cells
+### Filtering & Ordering Columns
-You can define the maximum width before wrapping for individual cells in
-columns. Minimum width is also supported. Wrapping will happen at word
-boundaries. Empty cells or those which do not fill the max/min width
-will be padded with spaces.
+By default, all properties are converted into columns, whether or not
+they exist on every object or not.
+
+To explicitly specify which columns to include, and in which order,
+supply a "columns" or "include" array ("include" is just an alias).
```javascript
+var data = [{
+ name: 'module1',
+ description: 'some description',
+ version: '0.0.1',
+}, {
+ name: 'module2',
+ description: 'another description',
+ version: '0.2.0',
+}]
+var columns = columnify(data, {
+ columns: ['name', 'version']
+})
+
+console.log(columns)
+```
+
+#### Output:
+```
+NAME VERSION
+module1 0.0.1
+module2 0.2.0
+```
+
+## Global and Per Column Options
+You can set a number of options at a global level (ie. for all columns) or on a per column basis.
+
+Set options on a per column basis by using the `config` option to specify individual columns:
+
+```javascript
+var columns = columnify(data, {
+ optionName: optionValue,
+ config: {
+ columnName: {optionName: optionValue},
+ columnName: {optionName: optionValue},
+ }
+})
+```
+
+### Maximum and Minimum Column Widths
+As with all options, you can define the `maxWidth` and `minWidth` globally, or for specified columns. By default, wrapping will happen at word boundaries. Empty cells or those which do not fill the `minWidth` will be padded with spaces.
+
+```javascript
var columns = columnify([{
name: 'mod1',
description: 'some description which happens to be far larger than the max',
@@ -117,24 +163,41 @@ var columns = columnify([{
name: 'module-two',
description: 'another description larger than the max',
version: '0.2.0',
+}], {
+ minWidth: 20,
+ config: {
+ description: {maxWidth: 30}
+ }
})
console.log(columns)
```
+
#### Output:
```
-NAME DESCRIPTION VERSION
-mod1 some description which happens 0.0.1
- to be far larger than the max
-module-two another description larger 0.2.0
- than the max
+NAME DESCRIPTION VERSION
+mod1 some description which happens 0.0.1
+ to be far larger than the max
+module-two another description larger 0.2.0
+ than the max
```
-### Truncating Column Cells
+#### Maximum Line Width
+
+You can set a hard maximum line width using the `maxLineWidth` option.
+Beyond this value data is unceremoniously truncated with no truncation
+marker.
+
+This can either be a number or 'auto' to set the value to the width of
+stdout.
+
+Setting this value to 'auto' prevent TTY-imposed line-wrapping when
+lines exceed the screen width.
+
+#### Truncating Column Cells Instead of Wrapping
You can disable wrapping and instead truncate content at the maximum
-column width. Truncation respects word boundaries. A truncation marker,
-`…` will appear next to the last word in any truncated line.
+column width by using the `truncate` option. Truncation respects word boundaries. A truncation marker, `…`, will appear next to the last word in any truncated line.
```javascript
var columns = columnify(data, {
@@ -155,43 +218,9 @@ mod1 some description… 0.0.1
module-two another description… 0.2.0
```
-### Filtering & Ordering Columns
-
-By default, all properties are converted into columns, whether or not
-they exist on every object or not.
-
-To explicitly specify which columns to include, and in which order,
-supply a "columns" or "include" array ("include" is just an alias).
-
-```javascript
-var data = [{
- name: 'module1',
- description: 'some description',
- version: '0.0.1',
-}, {
- name: 'module2',
- description: 'another description',
- version: '0.2.0',
-}]
-
-var columns = columnify(data, {
- columns: ['name', 'version'] // note description not included
-})
-
-console.log(columns)
-```
-
-#### Output:
-```
-NAME VERSION
-module1 0.0.1
-module2 0.2.0
-```
-
-
-## Other Configuration Options
### Align Right/Center
+You can set the alignment of the column data by using the `align` option.
```js
var data = {
@@ -211,10 +240,12 @@ commander@2.0.0 1
debug@0.8.1 1
```
-Align Center works in a similar way.
+`align: 'center'` works in a similar way.
+
+### Padding Character
-### Padding
+Set a character to fill whitespace within columns with the `paddingChr` option.
```js
var data = {
@@ -232,7 +263,7 @@ shortKey................... veryVeryVeryVeryVeryLongVal
veryVeryVeryVeryVeryLongKey shortVal...................
```
-### Preserve existing newlines
+### Preserve Existing Newlines
By default, `columnify` sanitises text by replacing any occurance of 1 or more whitespace characters with a single space.
@@ -284,7 +315,7 @@ runforcover@0.0.2 node_modules/tap/node_modules/runforcover
### Custom Truncation Marker
You can change the truncation marker to something other than the default
-`…`.
+`…` by using the `truncateMarker` option.
```javascript
var columns = columnify(data, {
@@ -309,10 +340,9 @@ module-two another description> 0.2.0
### Custom Column Splitter
If your columns need some bling, you can split columns with custom
-characters.
+characters by using the `columnSplitter` option.
```javascript
-
var columns = columnify(data, {
columnSplitter: ' | '
})
@@ -326,6 +356,48 @@ mod1 | some description which happens to be far larger than the max | 0.0.
module-two | another description larger than the max | 0.2.0
```
+### Control Header Display
+
+Control whether column headers are displayed by using the `showHeaders` option.
+
+```javascript
+var columns = columnify(data, {
+ 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.
+
+```javascript
+var columns = columnify([{
+ name: 'mod1',
+ description: 'SOME DESCRIPTION TEXT.'
+}, {
+ name: 'module-two',
+ description: 'SOME SLIGHTLY LONGER DESCRIPTION TEXT.'
+}], {
+ dataTransform: function(data) {
+ return data.toLowerCase()
+ },
+ config: {
+ name: {
+ headingTransform: function(heading) {
+ heading = "module " + heading
+ return "*" + heading.toUpperCase() + "*"
+ }
+ }
+ }
+})
+```
+#### Output:
+```
+*MODULE NAME* DESCRIPTION
+mod1 some description text.
+module-two some slightly longer description text.
+```
+
+
## Multibyte Character Support
`columnify` uses [mycoboco/wcwidth.js](https://github.com/mycoboco/wcwidth.js) to calculate length of multibyte characters:
@@ -362,6 +434,25 @@ module-one some description 0.0.1
这是一个很长的名字的模块 这真的是一个描述的内容这个描述很长 0.3.3
```
+## Contributions
+
+```
+ project : columnify
+ repo age : 1 year, 2 months
+ active : 32 days
+ commits : 120
+ files : 54
+ authors :
+ 90 Tim Oxley 75.0%
+ 8 Tim 6.7%
+ 7 Arjun Mehta 5.8%
+ 6 Dany 5.0%
+ 5 Wei Gao 4.2%
+ 2 Dany Shaanan 1.7%
+ 1 Seth Miller 0.8%
+ 1 Isaac Z. Schlueter 0.8%
+```
+
## License
MIT
diff --git a/deps/npm/node_modules/columnify/columnify.js b/deps/npm/node_modules/columnify/columnify.js
new file mode 100644
index 0000000000..548efc679d
--- /dev/null
+++ b/deps/npm/node_modules/columnify/columnify.js
@@ -0,0 +1,301 @@
+"use strict";
+
+var _toArray = function (arr) { return Array.isArray(arr) ? arr : Array.from(arr); };
+
+var wcwidth = require("./width");
+var _require = require("./utils");
+
+var padRight = _require.padRight;
+var padCenter = _require.padCenter;
+var padLeft = _require.padLeft;
+var splitIntoLines = _require.splitIntoLines;
+var splitLongWords = _require.splitLongWords;
+var truncateString = _require.truncateString;
+
+
+var DEFAULT_HEADING_TRANSFORM = function (key) {
+ return key.toUpperCase();
+};
+
+var DEFAULT_DATA_TRANSFORM = function (cell, column, index) {
+ return cell;
+};
+
+var DEFAULTS = Object.freeze({
+ maxWidth: Infinity,
+ minWidth: 0,
+ columnSplitter: " ",
+ truncate: false,
+ truncateMarker: "…",
+ preserveNewLines: false,
+ paddingChr: " ",
+ showHeaders: true,
+ headingTransform: DEFAULT_HEADING_TRANSFORM,
+ dataTransform: DEFAULT_DATA_TRANSFORM
+});
+
+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;
+ delete options.maxLineWidth; // this is a line control option, don't pass it to column
+
+ // Option defaults inheritance:
+ // options.config[columnName] => options => DEFAULTS
+ options = mixin({}, DEFAULTS, options);
+
+ options.config = options.config || Object.create(null);
+
+ 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
+ var columnNames = options.columns || []; // optional user-supplied columns to include
+
+ items = toArray(items, columnNames);
+
+ // if not suppled column names, automatically determine columns from data keys
+ if (!columnNames.length) {
+ items.forEach(function (item) {
+ for (var columnName in item) {
+ if (columnNames.indexOf(columnName) === -1) columnNames.push(columnName);
+ }
+ });
+ }
+
+ // initialize column defaults (each column inherits from options.config)
+ var columns = columnNames.reduce(function (columns, columnName) {
+ var column = Object.create(options);
+ columns[columnName] = mixin(column, columnConfigs[columnName]);
+ return columns;
+ }, Object.create(null));
+
+ // sanitize column settings
+ columnNames.forEach(function (columnName) {
+ var column = columns[columnName];
+ column.name = columnName;
+ column.maxWidth = Math.ceil(column.maxWidth);
+ column.minWidth = Math.ceil(column.minWidth);
+ column.truncate = !!column.truncate;
+ column.align = column.align || "left";
+ });
+
+ // sanitize data
+ items = items.map(function (item) {
+ var result = Object.create(null);
+ columnNames.forEach(function (columnName) {
+ // null/undefined -> ''
+ result[columnName] = item[columnName] != null ? item[columnName] : "";
+ // toString everything
+ result[columnName] = "" + result[columnName];
+ if (columns[columnName].preserveNewLines) {
+ // merge non-newline whitespace chars
+ result[columnName] = result[columnName].replace(/[^\S\n]/gmi, " ");
+ } else {
+ // merge all whitespace chars
+ result[columnName] = result[columnName].replace(/\s/gmi, " ");
+ }
+ });
+ return result;
+ });
+
+ // transform data cells
+ columnNames.forEach(function (columnName) {
+ var column = columns[columnName];
+ items = items.map(function (item, index) {
+ var col = Object.create(column);
+ item[columnName] = column.dataTransform(item[columnName], col, index);
+
+ var changedKeys = Object.keys(col);
+ // disable default heading transform if we wrote to column.name
+ if (changedKeys.indexOf("name") !== -1) {
+ if (column.headingTransform !== DEFAULT_HEADING_TRANSFORM) return;
+ column.headingTransform = function (heading) {
+ return heading;
+ };
+ }
+ changedKeys.forEach(function (key) {
+ return column[key] = col[key];
+ });
+ return item;
+ });
+ });
+
+ // add headers
+ var headers = {};
+ if (options.showHeaders) {
+ columnNames.forEach(function (columnName) {
+ var column = columns[columnName];
+ headers[columnName] = column.headingTransform(column.name);
+ });
+ items.unshift(headers);
+ }
+ // get actual max-width between min & max
+ // based on length of data in columns
+ columnNames.forEach(function (columnName) {
+ var column = columns[columnName];
+ column.width = items.map(function (item) {
+ return item[columnName];
+ }).reduce(function (min, cur) {
+ return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur))));
+ }, 0);
+ });
+
+ // split long words so they can break onto multiple lines
+ columnNames.forEach(function (columnName) {
+ var column = columns[columnName];
+ items = items.map(function (item) {
+ item[columnName] = splitLongWords(item[columnName], column.width, column.truncateMarker);
+ return item;
+ });
+ });
+
+ // wrap long lines. each item is now an array of lines.
+ columnNames.forEach(function (columnName) {
+ var column = columns[columnName];
+ items = items.map(function (item, index) {
+ var cell = item[columnName];
+ item[columnName] = splitIntoLines(cell, column.width);
+
+ // if truncating required, only include first line + add truncation char
+ if (column.truncate && item[columnName].length > 1) {
+ item[columnName] = splitIntoLines(cell, column.width - wcwidth(column.truncateMarker));
+ var firstLine = item[columnName][0];
+ if (!endsWith(firstLine, column.truncateMarker)) item[columnName][0] += column.truncateMarker;
+ item[columnName] = item[columnName].slice(0, 1);
+ }
+ return item;
+ });
+ });
+
+ // recalculate column widths from truncated output/lines
+ columnNames.forEach(function (columnName) {
+ var column = columns[columnName];
+ column.width = items.map(function (item) {
+ return item[columnName].reduce(function (min, cur) {
+ return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur))));
+ }, 0);
+ }).reduce(function (min, cur) {
+ return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, cur)));
+ }, 0);
+ });
+
+
+ var rows = createRows(items, columns, columnNames, options.paddingChr); // merge lines into rows
+ // conceive output
+ return rows.reduce(function (output, row) {
+ return output.concat(row.reduce(function (rowOut, line) {
+ return rowOut.concat(line.join(options.columnSplitter));
+ }, []));
+ }, []).map(function (line) {
+ return truncateString(line, maxLineWidth);
+ }).join(options.spacing);
+};
+
+/**
+ * Convert wrapped lines into rows with padded values.
+ *
+ * @param Array items data to process
+ * @param Array columns column width settings for wrapping
+ * @param Array columnNames column ordering
+ * @return Array items wrapped in arrays, corresponding to lines
+ */
+
+function createRows(items, columns, columnNames, paddingChr) {
+ return items.map(function (item) {
+ var row = [];
+ var numLines = 0;
+ columnNames.forEach(function (columnName) {
+ numLines = Math.max(numLines, item[columnName].length);
+ });
+ // 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);
+ }
+ return row;
+ });
+}
+
+/**
+ * Object.assign
+ *
+ * @return Object Object with properties mixed in.
+ */
+
+function mixin() {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ if (Object.assign) return Object.assign.apply(Object, _toArray(args));
+ return ObjectAssign.apply(undefined, _toArray(args));
+}
+
+function ObjectAssign(target, firstSource) {
+ "use strict";
+ if (target === undefined || target === null) throw new TypeError("Cannot convert first argument to object");
+
+ var to = Object(target);
+
+ var hasPendingException = false;
+ var pendingException;
+
+ for (var i = 1; i < arguments.length; i++) {
+ var nextSource = arguments[i];
+ if (nextSource === undefined || nextSource === null) continue;
+
+ var keysArray = Object.keys(Object(nextSource));
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
+ var nextKey = keysArray[nextIndex];
+ try {
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
+ if (desc !== undefined && desc.enumerable) to[nextKey] = nextSource[nextKey];
+ } catch (e) {
+ if (!hasPendingException) {
+ hasPendingException = true;
+ pendingException = e;
+ }
+ }
+ }
+
+ if (hasPendingException) throw pendingException;
+ }
+ return to;
+}
+
+/**
+ * Adapted from String.prototype.endsWith polyfill.
+ */
+
+function endsWith(target, searchString, position) {
+ position = position || target.length;
+ position = position - searchString.length;
+ var lastIndex = target.lastIndexOf(searchString);
+ return lastIndex !== -1 && lastIndex === position;
+}
+
+
+function toArray(items, columnNames) {
+ 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];
+ rows.push(item);
+ }
+ return rows;
+}
+
diff --git a/deps/npm/node_modules/columnify/index.js b/deps/npm/node_modules/columnify/index.js
index 8c15c993ea..781e683aa8 100644
--- a/deps/npm/node_modules/columnify/index.js
+++ b/deps/npm/node_modules/columnify/index.js
@@ -1,23 +1,20 @@
"use strict"
-var wcwidth = require('./width')
-var utils = require('./utils')
-var padRight = utils.padRight
-var padCenter = utils.padCenter
-var padLeft = utils.padLeft
-var splitIntoLines = utils.splitIntoLines
-var splitLongWords = utils.splitLongWords
-var truncateString = utils.truncateString
-
-var DEFAULT_HEADING_TRANSFORM = function(key) {
- return key.toUpperCase()
-}
+const wcwidth = require('./width')
+const {
+ padRight,
+ padCenter,
+ padLeft,
+ splitIntoLines,
+ splitLongWords,
+ truncateString
+} = require('./utils')
-var DEFAULT_DATA_TRANSFORM = function(cell, column, index) {
- return cell
-}
+const DEFAULT_HEADING_TRANSFORM = key => key.toUpperCase()
+
+const DEFAULT_DATA_TRANSFORM = (cell, column, index) => cell
-var DEFAULTS = {
+const DEFAULTS = Object.freeze({
maxWidth: Infinity,
minWidth: 0,
columnSplitter: ' ',
@@ -28,50 +25,50 @@ var DEFAULTS = {
showHeaders: true,
headingTransform: DEFAULT_HEADING_TRANSFORM,
dataTransform: DEFAULT_DATA_TRANSFORM
-}
-
-module.exports = function(items, options) {
+})
- options = options || {}
+module.exports = function(items, options = {}) {
- var columnConfigs = options.config || {}
+ let columnConfigs = options.config || {}
delete options.config // remove config so doesn't appear on every column.
- var maxLineWidth = options.maxLineWidth || Infinity
+ let maxLineWidth = options.maxLineWidth || 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:
// options.config[columnName] => options => DEFAULTS
- options = mixin(options, DEFAULTS)
+ options = mixin({}, DEFAULTS, options)
+
options.config = options.config || Object.create(null)
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
- var columnNames = options.columns || [] // optional user-supplied columns to include
+ let columnNames = options.columns || [] // optional user-supplied columns to include
items = toArray(items, columnNames)
// if not suppled column names, automatically determine columns from data keys
if (!columnNames.length) {
items.forEach(function(item) {
- for (var columnName in item) {
+ for (let columnName in item) {
if (columnNames.indexOf(columnName) === -1) columnNames.push(columnName)
}
})
}
// initialize column defaults (each column inherits from options.config)
- var columns = columnNames.reduce(function(columns, columnName) {
- var column = Object.create(options)
+ let columns = columnNames.reduce((columns, columnName) => {
+ let column = Object.create(options)
columns[columnName] = mixin(column, columnConfigs[columnName])
return columns
}, Object.create(null))
// sanitize column settings
- columnNames.forEach(function(columnName) {
- var column = columns[columnName]
+ columnNames.forEach(columnName => {
+ let column = columns[columnName]
column.name = columnName
column.maxWidth = Math.ceil(column.maxWidth)
column.minWidth = Math.ceil(column.minWidth)
@@ -80,9 +77,9 @@ module.exports = function(items, options) {
})
// sanitize data
- items = items.map(function(item) {
- var result = Object.create(null)
- columnNames.forEach(function(columnName) {
+ items = items.map(item => {
+ let result = Object.create(null)
+ columnNames.forEach(columnName => {
// null/undefined -> ''
result[columnName] = item[columnName] != null ? item[columnName] : ''
// toString everything
@@ -99,94 +96,92 @@ module.exports = function(items, options) {
})
// transform data cells
- columnNames.forEach(function(columnName) {
- var column = columns[columnName]
- items = items.map(function(item, index) {
- var col = Object.create(column)
+ columnNames.forEach(columnName => {
+ let column = columns[columnName]
+ items = items.map((item, index) => {
+ let col = Object.create(column)
item[columnName] = column.dataTransform(item[columnName], col, index)
- var changedKeys = Object.keys(col)
+ let changedKeys = Object.keys(col)
// disable default heading transform if we wrote to column.name
if (changedKeys.indexOf('name') !== -1) {
if (column.headingTransform !== DEFAULT_HEADING_TRANSFORM) return
- column.headingTransform = function(heading) {return heading}
+ column.headingTransform = heading => heading
}
- changedKeys.forEach(function(key) {
- column[key] = col[key]
- })
+ changedKeys.forEach(key => column[key] = col[key])
return item
})
})
// add headers
- var headers = {}
+ let headers = {}
if(options.showHeaders) {
- columnNames.forEach(function(columnName) {
- var column = columns[columnName]
+ columnNames.forEach(columnName => {
+ let column = columns[columnName]
headers[columnName] = column.headingTransform(column.name)
})
items.unshift(headers)
}
// get actual max-width between min & max
// based on length of data in columns
- columnNames.forEach(function(columnName) {
- var column = columns[columnName]
- column.width = items.map(function(item) {
- return item[columnName]
- }).reduce(function(min, cur) {
+ columnNames.forEach(columnName => {
+ let column = columns[columnName]
+ column.width = items
+ .map(item => item[columnName])
+ .reduce((min, cur) => {
return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur))))
}, 0)
})
// split long words so they can break onto multiple lines
- columnNames.forEach(function(columnName) {
- var column = columns[columnName]
- items = items.map(function(item) {
+ columnNames.forEach(columnName => {
+ let column = columns[columnName]
+ items = items.map(item => {
item[columnName] = splitLongWords(item[columnName], column.width, column.truncateMarker)
return item
})
})
// wrap long lines. each item is now an array of lines.
- columnNames.forEach(function(columnName) {
- var column = columns[columnName]
- items = items.map(function(item, index) {
- var cell = item[columnName]
+ columnNames.forEach(columnName => {
+ let column = columns[columnName]
+ items = items.map((item, index) => {
+ let cell = item[columnName]
item[columnName] = splitIntoLines(cell, column.width)
// if truncating required, only include first line + add truncation char
if (column.truncate && item[columnName].length > 1) {
- item[columnName] = splitIntoLines(cell, column.width - wcwidth(column.truncateMarker))
- var firstLine = item[columnName][0]
- if (!endsWith(firstLine, column.truncateMarker)) item[columnName][0] += column.truncateMarker
- item[columnName] = item[columnName].slice(0, 1)
+ item[columnName] = splitIntoLines(cell, column.width - wcwidth(column.truncateMarker))
+ let firstLine = item[columnName][0]
+ if (!endsWith(firstLine, column.truncateMarker)) item[columnName][0] += column.truncateMarker
+ item[columnName] = item[columnName].slice(0, 1)
}
return item
})
})
// recalculate column widths from truncated output/lines
- columnNames.forEach(function(columnName) {
- var column = columns[columnName]
- column.width = items.map(function(item) {
- return item[columnName].reduce(function(min, cur) {
+ columnNames.forEach(columnName => {
+ let column = columns[columnName]
+ column.width = items.map(item => {
+ return item[columnName].reduce((min, cur) => {
return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, wcwidth(cur))))
}, 0)
- }).reduce(function(min, cur) {
+ }).reduce((min, cur) => {
return Math.max(min, Math.min(column.maxWidth, Math.max(column.minWidth, cur)))
}, 0)
})
- var rows = createRows(items, columns, columnNames, options.paddingChr) // merge lines into rows
+ let rows = createRows(items, columns, columnNames, options.paddingChr) // merge lines into rows
// conceive output
- return rows.reduce(function(output, row) {
- return output.concat(row.reduce(function(rowOut, line) {
+ return rows.reduce((output, row) => {
+ return output.concat(row.reduce((rowOut, line) => {
return rowOut.concat(line.join(options.columnSplitter))
}, []))
- }, []).map(function(line) {
- return truncateString(line, maxLineWidth)
- }).join(options.spacing)
+ }, [])
+ .map(line => truncateString(line, maxLineWidth))
+ .join(options.spacing)
}
/**
@@ -199,18 +194,18 @@ module.exports = function(items, options) {
*/
function createRows(items, columns, columnNames, paddingChr) {
- return items.map(function(item) {
- var row = []
- var numLines = 0
- columnNames.forEach(function(columnName) {
+ return items.map(item => {
+ let row = []
+ let numLines = 0
+ columnNames.forEach(columnName => {
numLines = Math.max(numLines, item[columnName].length)
})
// combine matching lines of each rows
- for (var i = 0; i < numLines; i++) {
+ for (let i = 0; i < numLines; i++) {
row[i] = row[i] || []
- columnNames.forEach(function(columnName) {
- var column = columns[columnName]
- var val = item[columnName][i] || '' // || '' ensures empty columns get padded
+ columnNames.forEach(columnName => {
+ let column = columns[columnName]
+ let 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))
@@ -221,22 +216,50 @@ function createRows(items, columns, columnNames, paddingChr) {
}
/**
- * Generic source->target mixin.
- * Copy properties from `source` into `target` if target doesn't have them.
- * Destructive. Modifies `target`.
+ * Object.assign
*
- * @param target Object target for mixin properties.
- * @param source Object source of mixin properties.
- * @return Object `target` after mixin applied.
+ * @return Object Object with properties mixed in.
*/
-function mixin(target, source) {
- source = source || {}
- for (var key in source) {
- if (target.hasOwnProperty(key)) continue
- target[key] = source[key]
+function mixin(...args) {
+ if (Object.assign) return Object.assign(...args)
+ return ObjectAssign(...args)
+}
+
+function ObjectAssign(target, firstSource) {
+ "use strict";
+ if (target === undefined || target === null)
+ throw new TypeError("Cannot convert first argument to object");
+
+ var to = Object(target);
+
+ var hasPendingException = false;
+ var pendingException;
+
+ for (var i = 1; i < arguments.length; i++) {
+ var nextSource = arguments[i];
+ if (nextSource === undefined || nextSource === null)
+ continue;
+
+ var keysArray = Object.keys(Object(nextSource));
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
+ var nextKey = keysArray[nextIndex];
+ try {
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
+ if (desc !== undefined && desc.enumerable)
+ to[nextKey] = nextSource[nextKey];
+ } catch (e) {
+ if (!hasPendingException) {
+ hasPendingException = true;
+ pendingException = e;
+ }
+ }
+ }
+
+ if (hasPendingException)
+ throw pendingException;
}
- return target
+ return to;
}
/**
@@ -246,16 +269,16 @@ function mixin(target, source) {
function endsWith(target, searchString, position) {
position = position || target.length;
position = position - searchString.length;
- var lastIndex = target.lastIndexOf(searchString);
+ let lastIndex = target.lastIndexOf(searchString);
return lastIndex !== -1 && lastIndex === position;
}
function toArray(items, columnNames) {
if (Array.isArray(items)) return items
- var rows = []
- for (var key in items) {
- var item = {}
+ let rows = []
+ for (let key in items) {
+ let item = {}
item[columnNames[0] || 'key'] = key
item[columnNames[1] || 'value'] = items[key]
rows.push(item)
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js b/deps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js
index 5b9546aabf..b83f63b907 100755
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js
+++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/cli.js
@@ -34,12 +34,12 @@ if (argv.indexOf('--version') !== -1) {
return;
}
-if (process.stdin.isTTY) {
- if (!input) {
- help();
- return;
- }
+if (!input && process.stdin.isTTY) {
+ help();
+ return;
+}
+if (input) {
init(fs.readFileSync(input, 'utf8'));
} else {
process.stdin.setEncoding('utf8');
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json b/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json
index 89d1041bd7..f04f66f75d 100644
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json
+++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json
@@ -1,11 +1,11 @@
{
"name": "strip-ansi",
- "version": "2.0.0",
+ "version": "2.0.1",
"description": "Strip ANSI escape codes",
"license": "MIT",
"repository": {
"type": "git",
- "url": "git://github.com/sindresorhus/strip-ansi"
+ "url": "https://github.com/sindresorhus/strip-ansi"
},
"author": {
"name": "Sindre Sorhus",
@@ -56,15 +56,15 @@
"devDependencies": {
"mocha": "*"
},
- "gitHead": "c5e780acc07532f5d651cfb6ea035198095c6c74",
+ "gitHead": "1eff0936c01f89efa312d9d51deed137259871a1",
"bugs": {
"url": "https://github.com/sindresorhus/strip-ansi/issues"
},
"homepage": "https://github.com/sindresorhus/strip-ansi",
- "_id": "strip-ansi@2.0.0",
- "_shasum": "fa8d69432e97674746f55f51d076ae78b18df13f",
+ "_id": "strip-ansi@2.0.1",
+ "_shasum": "df62c1aa94ed2f114e1d0f21fd1d50482b79a60e",
"_from": "strip-ansi@>=2.0.0 <3.0.0",
- "_npmVersion": "1.4.14",
+ "_npmVersion": "1.4.28",
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
@@ -80,10 +80,9 @@
}
],
"dist": {
- "shasum": "fa8d69432e97674746f55f51d076ae78b18df13f",
- "tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.0.tgz"
+ "shasum": "df62c1aa94ed2f114e1d0f21fd1d50482b79a60e",
+ "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.0.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-2.0.1.tgz"
}
diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md b/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md
index 5477079d00..53ec26436c 100644
--- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md
+++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/readme.md
@@ -15,7 +15,7 @@ $ npm install --save strip-ansi
```js
var stripAnsi = require('strip-ansi');
-stripAnsi('\x1b[4mcake\x1b[0m');
+stripAnsi('\u001b[4mcake\u001b[0m');
//=> 'cake'
```
@@ -29,12 +29,12 @@ $ npm install --global strip-ansi
```sh
$ strip-ansi --help
-Usage
- $ strip-ansi <input-file> > <output-file>
- $ cat <input-file> | strip-ansi > <output-file>
+ Usage
+ strip-ansi <input-file> > <output-file>
+ cat <input-file> | strip-ansi > <output-file>
-Example
- $ strip-ansi unicorn.txt > unicorn-stripped.txt
+ Example
+ strip-ansi unicorn.txt > unicorn-stripped.txt
```
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 4744d9dc3f..49fc6f0408 100644
--- a/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json
+++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json
@@ -56,5 +56,6 @@
"shasum": "02d059ff7a8fc741e0f6b5da1e69b2b40daeca6f",
"tarball": "http://registry.npmjs.org/wcwidth/-/wcwidth-1.0.0.tgz"
},
- "_resolved": "https://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!"
}
diff --git a/deps/npm/node_modules/columnify/package.json b/deps/npm/node_modules/columnify/package.json
index c60e1d9de6..a275672342 100644
--- a/deps/npm/node_modules/columnify/package.json
+++ b/deps/npm/node_modules/columnify/package.json
@@ -1,18 +1,20 @@
{
"name": "columnify",
- "version": "1.3.2",
+ "version": "1.4.1",
"description": "Render data in text columns. supports in-column text-wrap.",
- "main": "index.js",
+ "main": "columnify.js",
"scripts": {
"pretest": "npm prune",
- "test": "tape test/*.js | tap-spec",
- "bench": "npm test && node bench"
+ "test": "make prepublish && tape test/*.js | tap-spec",
+ "bench": "npm test && node bench",
+ "prepublish": "make prepublish"
},
"author": {
"name": "Tim Oxley"
},
"license": "MIT",
"devDependencies": {
+ "6to5": "^3.0.9",
"chalk": "^0.5.1",
"tap-spec": "^2.1.1",
"tape": "^3.0.3"
@@ -41,12 +43,12 @@
"directories": {
"test": "test"
},
- "gitHead": "5c7d4363a8d6178f0d415e8bdaf692281fe71975",
- "_id": "columnify@1.3.2",
- "_shasum": "61bd578a9269ae6fd949ce36fff589f3702c7867",
- "_from": "columnify@>=1.3.2 <1.4.0",
- "_npmVersion": "2.1.10",
- "_nodeVersion": "0.10.33",
+ "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",
"_npmUser": {
"name": "timoxley",
"email": "secoif@gmail.com"
@@ -58,8 +60,8 @@
}
],
"dist": {
- "shasum": "61bd578a9269ae6fd949ce36fff589f3702c7867",
- "tarball": "http://registry.npmjs.org/columnify/-/columnify-1.3.2.tgz"
+ "shasum": "30555796379865b016189c228cb0061764270ed0",
+ "tarball": "http://registry.npmjs.org/columnify/-/columnify-1.4.1.tgz"
},
- "_resolved": "https://registry.npmjs.org/columnify/-/columnify-1.3.2.tgz"
+ "_resolved": "https://registry.npmjs.org/columnify/-/columnify-1.4.1.tgz"
}
diff --git a/deps/npm/node_modules/fstream/lib/writer.js b/deps/npm/node_modules/fstream/lib/writer.js
index 8b1bbf94f0..0700813b67 100644
--- a/deps/npm/node_modules/fstream/lib/writer.js
+++ b/deps/npm/node_modules/fstream/lib/writer.js
@@ -195,7 +195,7 @@ function endChmod (me, want, current, path, cb) {
function endChown (me, want, current, path, cb) {
// Don't even try it unless root. Too easy to EPERM.
if (process.platform === "win32") return cb()
- if (!process.getuid || !process.getuid() === 0) return cb()
+ if (!process.getuid || process.getuid() !== 0) return cb()
if (typeof want.uid !== "number" &&
typeof want.gid !== "number" ) return cb()
diff --git a/deps/npm/node_modules/fstream/package.json b/deps/npm/node_modules/fstream/package.json
index f920c10036..6b2de73a2f 100644
--- a/deps/npm/node_modules/fstream/package.json
+++ b/deps/npm/node_modules/fstream/package.json
@@ -6,7 +6,7 @@
},
"name": "fstream",
"description": "Advanced file system stream things",
- "version": "1.0.3",
+ "version": "1.0.4",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/fstream.git"
@@ -30,12 +30,12 @@
"license": "BSD",
"readme": "Like FS streams, but with stat on them, and supporting directories and\nsymbolic links, as well as normal files. Also, you can use this to set\nthe stats on a file, even if you don't change its contents, or to create\na symlink, etc.\n\nSo, for example, you can \"write\" a directory, and it'll call `mkdir`. You\ncan specify a uid and gid, and it'll call `chown`. You can specify a\n`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink\nand provide a `linkpath` and it'll call `symlink`.\n\nNote that it won't automatically resolve symbolic links. So, if you\ncall `fstream.Reader('/some/symlink')` then you'll get an object\nthat stats and then ends immediately (since it has no data). To follow\nsymbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:\ntrue })`.\n\nThere are various checks to make sure that the bytes emitted are the\nsame as the intended size, if the size is set.\n\n## Examples\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n })\n .write(\"hello\\n\")\n .end()\n```\n\nThis will create the directories if they're missing, and then write\n`hello\\n` into the file, chmod it to 0755, and assert that 6 bytes have\nbeen written when it's done.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n , flags: \"a\"\n })\n .write(\"hello\\n\")\n .end()\n```\n\nYou can pass flags in, if you want to append to a file.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/symlink\"\n , linkpath: \"./file\"\n , SymbolicLink: true\n , mode: \"0755\" // octal strings supported\n })\n .end()\n```\n\nIf isSymbolicLink is a function, it'll be called, and if it returns\ntrue, then it'll treat it as a symlink. If it's not a function, then\nany truish value will make a symlink, or you can set `type:\n'SymbolicLink'`, which does the same thing.\n\nNote that the linkpath is relative to the symbolic link location, not\nthe parent dir or cwd.\n\n```javascript\nfstream\n .Reader(\"path/to/dir\")\n .pipe(fstream.Writer(\"path/to/other/dir\"))\n```\n\nThis will do like `cp -Rp path/to/dir path/to/other/dir`. If the other\ndir exists and isn't a directory, then it'll emit an error. It'll also\nset the uid, gid, mode, etc. to be identical. In this way, it's more\nlike `rsync -a` than simply a copy.\n",
"readmeFilename": "README.md",
- "gitHead": "d205397b27d93eee5314e9d2d87693e82b560106",
+ "gitHead": "0bdcf1db6f9b04755b644f8268fc3726875367a6",
"bugs": {
"url": "https://github.com/isaacs/fstream/issues"
},
"homepage": "https://github.com/isaacs/fstream",
- "_id": "fstream@1.0.3",
- "_shasum": "5ce69767710d7a39c8cd9232470d9426790195da",
- "_from": "fstream@>=1.0.3 <1.1.0"
+ "_id": "fstream@1.0.4",
+ "_shasum": "6c52298473fd6351fd22fc4bf9254fcfebe80f2b",
+ "_from": "fstream@>=1.0.4 <1.1.0"
}
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 068bb00a82..1b7d2c0638 100644
--- a/deps/npm/node_modules/init-package-json/default-input.js
+++ b/deps/npm/node_modules/init-package-json/default-input.js
@@ -28,7 +28,7 @@ function readDeps (test) { return function (cb) {
try { p = JSON.parse(p) }
catch (e) { return next() }
if (!p.version) return next()
- deps[d] = config.get('save-prefix') + p.version
+ deps[d] = config.get('save-exact') ? p.version : config.get('save-prefix') + p.version
return next()
})
})
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 c15c772241..f66857539f 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
@@ -44,5 +44,6 @@
"tarball": "http://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz"
+ "_resolved": "https://registry.npmjs.org/promzard/-/promzard-0.2.2.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json
index de90de6207..f3cadb45e7 100644
--- a/deps/npm/node_modules/init-package-json/package.json
+++ b/deps/npm/node_modules/init-package-json/package.json
@@ -1,6 +1,6 @@
{
"name": "init-package-json",
- "version": "1.1.3",
+ "version": "1.2.0",
"main": "init-package-json.js",
"scripts": {
"test": "tap test/*.js"
@@ -38,14 +38,34 @@
"prompt",
"start"
],
- "readme": "# init-package-json\n\nA node module to get your node module started.\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": "b766900b2d615ddc43c452e251b8c5543538e832",
+ "gitHead": "6c0743199706494a190c0b47d2e2567dc86055a3",
"bugs": {
"url": "https://github.com/isaacs/init-package-json/issues"
},
"homepage": "https://github.com/isaacs/init-package-json",
- "_id": "init-package-json@1.1.3",
- "_shasum": "1d633c151a4909891afc8ee13cace8b336c0c9c2",
- "_from": "init-package-json@>=1.1.3 <1.2.0"
+ "_id": "init-package-json@1.2.0",
+ "_shasum": "b9f027514403b3b3f582c148592ab75214003348",
+ "_from": "init-package-json@>=1.2.0 <1.3.0",
+ "_npmVersion": "2.3.0",
+ "_nodeVersion": "0.10.35",
+ "_npmUser": {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ }
+ ],
+ "dist": {
+ "shasum": "b9f027514403b3b3f582c148592ab75214003348",
+ "tarball": "http://registry.npmjs.org/init-package-json/-/init-package-json-1.2.0.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.2.0.tgz"
}
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/npm-registry-client/README.md b/deps/npm/node_modules/npm-registry-client/README.md
index a35c483117..702ae2ea1d 100644
--- a/deps/npm/node_modules/npm-registry-client/README.md
+++ b/deps/npm/node_modules/npm-registry-client/README.md
@@ -55,6 +55,19 @@ for authorization. These credentials always look the same:
## API
+### client.access(uri, params, cb)
+
+* `uri` {String} Registry URL for the package's access API endpoint.
+ Looks like `/-/package/<package name>/access`.
+* `params` {Object} Object containing per-request properties.
+ * `access` {String} New access level for the package. Can be either
+ `public` or `restricted`. Registry will raise an error if trying
+ to change the access level of an unscoped package.
+ * `auth` {Credentials}
+
+Set the access level for scoped packages. For now, there are only two
+access levels: "public" and "restricted".
+
### client.adduser(uri, params, cb)
* `uri` {String} Base registry URL.
@@ -79,6 +92,67 @@ Add a user account to the registry, or verify the credentials.
Deprecate a version of a package in the registry.
+### client.distTags.fetch(uri, params, cb)
+
+* `uri` {String} Base URL for the registry.
+* `params` {Object} Object containing per-request properties.
+ * `package` {String} Name of the package.
+ * `auth` {Credentials}
+* `cb` {Function}
+
+Fetch all of the `dist-tags` for the named package.
+
+### client.distTags.add(uri, params, cb)
+
+* `uri` {String} Base URL for the registry.
+* `params` {Object} Object containing per-request properties.
+ * `package` {String} Name of the package.
+ * `distTag` {String} Name of the new `dist-tag`.
+ * `version` {String} Exact version to be mapped to the `dist-tag`.
+ * `auth` {Credentials}
+* `cb` {Function}
+
+Add (or replace) a single dist-tag onto the named package.
+
+### client.distTags.set(uri, params, cb)
+
+* `uri` {String} Base URL for the registry.
+* `params` {Object} Object containing per-request properties.
+ * `package` {String} Name of the package.
+ * `distTags` {Object} Object containing a map from tag names to package
+ versions.
+ * `auth` {Credentials}
+* `cb` {Function}
+
+Set all of the `dist-tags` for the named package at once, creating any
+`dist-tags` that do not already exit. Any `dist-tags` not included in the
+`distTags` map will be removed.
+
+### client.distTags.update(uri, params, cb)
+
+* `uri` {String} Base URL for the registry.
+* `params` {Object} Object containing per-request properties.
+ * `package` {String} Name of the package.
+ * `distTags` {Object} Object containing a map from tag names to package
+ versions.
+ * `auth` {Credentials}
+* `cb` {Function}
+
+Update the values of multiple `dist-tags`, creating any `dist-tags` that do
+not already exist. Any pre-existing `dist-tags` not included in the `distTags`
+map will be left alone.
+
+### client.distTags.rm(uri, params, cb)
+
+* `uri` {String} Base URL for the registry.
+* `params` {Object} Object containing per-request properties.
+ * `package` {String} Name of the package.
+ * `distTag` {String} Name of the new `dist-tag`.
+ * `auth` {Credentials}
+* `cb` {Function}
+
+Remove a single `dist-tag` from the named package.
+
### client.get(uri, params, cb)
* `uri` {String} The complete registry URI to fetch
@@ -100,6 +174,7 @@ with the ETag or the "Last Modified" timestamp.
* `uri` {String} The registry URI for the package to publish.
* `params` {Object} Object containing per-request properties.
* `metadata` {Object} Package metadata.
+ * `access` {String} Access for the package. Can be `public` or `restricted` (no default).
* `body` {Stream} Stream of the package body / tarball.
* `auth` {Credentials}
* `cb` {Function}
@@ -215,7 +290,7 @@ any):
* `proxy.https` {URL} The URL to proxy HTTPS requests through. Defaults to be
the same as `proxy.http` if unset.
* `proxy.localAddress` {IP} The local address to use on multi-homed systems.
-* `ssl.ca` {String} Cerficate signing authority certificates to trust.
+* `ssl.ca` {String} Certificate signing authority certificates to trust.
* `ssl.certificate` {String} Client certificate (PEM encoded). Enable access
to servers that require client certificates.
* `ssl.key` {String} Private key (PEM encoded) for client certificate.
diff --git a/deps/npm/node_modules/npm-registry-client/index.js b/deps/npm/node_modules/npm-registry-client/index.js
index 801d00f8e9..6ea288b0a6 100644
--- a/deps/npm/node_modules/npm-registry-client/index.js
+++ b/deps/npm/node_modules/npm-registry-client/index.js
@@ -46,11 +46,34 @@ function RegClient (config) {
this.log = this.config.log || npmlog
delete this.config.log
+
+ var client = this
+ fs.readdirSync(join(__dirname, "lib")).forEach(function (f) {
+ var entry = join(__dirname, "lib", f)
+
+ // lib/group-name/operation.js -> client.groupName.operation
+ var stat = fs.statSync(entry)
+ if (stat.isDirectory()) {
+ var groupName = f.replace(/-([a-z])/, dashToCamel)
+ fs.readdirSync(entry).forEach(function (f) {
+ if (!f.match(/\.js$/)) return
+
+ if (!client[groupName]) {
+ // keep client.groupName.operation from stomping client.operation
+ client[groupName] = Object.create(client)
+ }
+ var name = f.replace(/\.js$/, "").replace(/-([a-z])/, dashToCamel)
+ client[groupName][name] = require(join(entry, f))
+ })
+ return
+ }
+
+ if (!f.match(/\.js$/)) return
+ var name = f.replace(/\.js$/, "").replace(/-([a-z])/, dashToCamel)
+ client[name] = require(entry)
+ })
}
-fs.readdirSync(join(__dirname, "lib")).forEach(function (f) {
- if (!f.match(/\.js$/)) return
- var name = f.replace(/\.js$/, "")
- .replace(/-([a-z])/, function (_, l) { return l.toUpperCase() })
- RegClient.prototype[name] = require(join(__dirname, "lib", f))
-})
+function dashToCamel (_, l) {
+ return l.toUpperCase()
+}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/access.js b/deps/npm/node_modules/npm-registry-client/lib/access.js
new file mode 100644
index 0000000000..c642d16f3f
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/lib/access.js
@@ -0,0 +1,30 @@
+module.exports = access
+
+var assert = require("assert")
+
+function access (uri, params, cb) {
+ assert(typeof uri === "string", "must pass registry URI to access")
+ assert(params && typeof params === "object", "must pass params to access")
+ assert(typeof cb === "function", "muss pass callback to access")
+
+ assert(typeof params.level === "string", "must pass level to access")
+ assert(
+ ["public", "restricted"].indexOf(params.level) !== -1,
+ "access level must be either 'public' or 'restricted'"
+ )
+ assert(
+ params.auth && typeof params.auth === "object",
+ "must pass auth to access"
+ )
+
+ var body = {
+ access : params.level
+ }
+
+ var options = {
+ method : "POST",
+ body : JSON.stringify(body),
+ auth : params.auth
+ }
+ this.request(uri, options, cb)
+}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/add.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/add.js
new file mode 100644
index 0000000000..7443cbca2f
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/add.js
@@ -0,0 +1,43 @@
+module.exports = add
+
+var assert = require("assert")
+var url = require("url")
+
+var npa = require("npm-package-arg")
+
+function add (uri, params, cb) {
+ assert(typeof uri === "string", "must pass registry URI to distTags.add")
+ assert(
+ params && typeof params === "object",
+ "must pass params to distTags.add"
+ )
+ assert(typeof cb === "function", "muss pass callback to distTags.add")
+
+ assert(
+ typeof params.package === "string",
+ "must pass package name to distTags.add"
+ )
+ assert(
+ typeof params.distTag === "string",
+ "must pass package distTag name to distTags.add"
+ )
+ assert(
+ typeof params.version === "string",
+ "must pass version to be mapped to distTag to distTags.add"
+ )
+ assert(
+ params.auth && typeof params.auth === "object",
+ "must pass auth to distTags.add"
+ )
+
+ var p = npa(params.package)
+ var package = p.scope ? params.package.replace("/", "%2f") : params.package
+ var rest = "-/package/"+package+"/dist-tags/"+params.distTag
+
+ var options = {
+ method : "PUT",
+ body : JSON.stringify(params.version),
+ auth : params.auth
+ }
+ this.request(url.resolve(uri, rest), options, cb)
+}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js
new file mode 100644
index 0000000000..46bb33f4d5
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/fetch.js
@@ -0,0 +1,37 @@
+module.exports = fetch
+
+var assert = require("assert")
+var url = require("url")
+
+var npa = require("npm-package-arg")
+
+function fetch (uri, params, cb) {
+ assert(typeof uri === "string", "must pass registry URI to distTags.fetch")
+ assert(
+ params && typeof params === "object",
+ "must pass params to distTags.fetch"
+ )
+ assert(typeof cb === "function", "muss pass callback to distTags.fetch")
+
+ assert(
+ typeof params.package === "string",
+ "must pass package name to distTags.fetch"
+ )
+ assert(
+ params.auth && typeof params.auth === "object",
+ "must pass auth to distTags.fetch"
+ )
+
+ var p = npa(params.package)
+ var package = p.scope ? params.package.replace("/", "%2f") : params.package
+ var rest = "-/package/"+package+"/dist-tags"
+
+ var options = {
+ method : "GET",
+ auth : params.auth
+ }
+ this.request(url.resolve(uri, rest), options, function (er, data) {
+ if (data && typeof data === "object") delete data._etag
+ cb(er, data)
+ })
+}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/rm.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/rm.js
new file mode 100644
index 0000000000..dbae245ecf
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/rm.js
@@ -0,0 +1,38 @@
+module.exports = rm
+
+var assert = require("assert")
+var url = require("url")
+
+var npa = require("npm-package-arg")
+
+function rm (uri, params, cb) {
+ assert(typeof uri === "string", "must pass registry URI to distTags.rm")
+ assert(
+ params && typeof params === "object",
+ "must pass params to distTags.rm"
+ )
+ assert(typeof cb === "function", "muss pass callback to distTags.rm")
+
+ assert(
+ typeof params.package === "string",
+ "must pass package name to distTags.rm"
+ )
+ assert(
+ typeof params.distTag === "string",
+ "must pass package distTag name to distTags.rm"
+ )
+ assert(
+ params.auth && typeof params.auth === "object",
+ "must pass auth to distTags.rm"
+ )
+
+ var p = npa(params.package)
+ var package = p.scope ? params.package.replace("/", "%2f") : params.package
+ var rest = "-/package/"+package+"/dist-tags/"+params.distTag
+
+ var options = {
+ method : "DELETE",
+ auth : params.auth
+ }
+ this.request(url.resolve(uri, rest), options, cb)
+}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/set.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/set.js
new file mode 100644
index 0000000000..e1e17cde50
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/set.js
@@ -0,0 +1,39 @@
+module.exports = set
+
+var assert = require("assert")
+var url = require("url")
+
+var npa = require("npm-package-arg")
+
+function set (uri, params, cb) {
+ assert(typeof uri === "string", "must pass registry URI to distTags.set")
+ assert(
+ params && typeof params === "object",
+ "must pass params to distTags.set"
+ )
+ assert(typeof cb === "function", "muss pass callback to distTags.set")
+
+ assert(
+ typeof params.package === "string",
+ "must pass package name to distTags.set"
+ )
+ assert(
+ params.distTags && typeof params.distTags === "object",
+ "must pass distTags map to distTags.set"
+ )
+ assert(
+ params.auth && typeof params.auth === "object",
+ "must pass auth to distTags.set"
+ )
+
+ var p = npa(params.package)
+ var package = p.scope ? params.package.replace("/", "%2f") : params.package
+ var rest = "-/package/"+package+"/dist-tags"
+
+ var options = {
+ method : "PUT",
+ body : JSON.stringify(params.distTags),
+ auth : params.auth
+ }
+ this.request(url.resolve(uri, rest), options, cb)
+}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/dist-tags/update.js b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/update.js
new file mode 100644
index 0000000000..6c46fc5322
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/lib/dist-tags/update.js
@@ -0,0 +1,39 @@
+module.exports = update
+
+var assert = require("assert")
+var url = require("url")
+
+var npa = require("npm-package-arg")
+
+function update (uri, params, cb) {
+ assert(typeof uri === "string", "must pass registry URI to distTags.update")
+ assert(
+ params && typeof params === "object",
+ "must pass params to distTags.update"
+ )
+ assert(typeof cb === "function", "muss pass callback to distTags.update")
+
+ assert(
+ typeof params.package === "string",
+ "must pass package name to distTags.update"
+ )
+ assert(
+ params.distTags && typeof params.distTags === "object",
+ "must pass distTags map to distTags.update"
+ )
+ assert(
+ params.auth && typeof params.auth === "object",
+ "must pass auth to distTags.update"
+ )
+
+ var p = npa(params.package)
+ var package = p.scope ? params.package.replace("/", "%2f") : params.package
+ var rest = "-/package/"+package+"/dist-tags"
+
+ var options = {
+ method : "POST",
+ body : JSON.stringify(params.distTags),
+ auth : params.auth
+ }
+ this.request(url.resolve(uri, rest), options, cb)
+}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/fetch.js b/deps/npm/node_modules/npm-registry-client/lib/fetch.js
index b0764b6104..2d1c6f6b82 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/fetch.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/fetch.js
@@ -22,6 +22,9 @@ function fetch (uri, params, cb) {
if (operation.retry(er)) {
client.log.info("retry", "will retry, error on last attempt: " + er)
}
+ else {
+ cb(er)
+ }
})
req.on("response", function (res) {
diff --git a/deps/npm/node_modules/npm-registry-client/lib/initialize.js b/deps/npm/node_modules/npm-registry-client/lib/initialize.js
index bd5a4caae3..e7215bc780 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/initialize.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/initialize.js
@@ -4,8 +4,8 @@ var HttpsAgent = require("https").Agent
var pkg = require("../package.json")
-var httpAgent = new HttpAgent({ keepAlive : true })
-var httpsAgent = new HttpsAgent({ keepAlive : true })
+var httpAgent
+var httpsAgent
module.exports = initialize
@@ -23,21 +23,28 @@ function initialize (uri, method, accept, headers) {
strictSSL : this.config.ssl.strict,
cert : this.config.ssl.certificate,
key : this.config.ssl.key,
- ca : this.config.ssl.ca
+ ca : this.config.ssl.ca,
+ agent : getAgent(uri.protocol, this.config)
}
- // request will not pay attention to the NOPROXY environment variable if a
- // config value named proxy is passed in, even if it's set to null.
- var proxy
- if (uri.protocol === "https:") {
- proxy = this.config.proxy.https
- opts.agent = httpsAgent
+ // allow explicit disabling of proxy in environment via CLI
+ //
+ // how false gets here is the CLI's problem (it's gross)
+ if (this.config.proxy.http === false) {
+ opts.proxy = null
}
else {
- proxy = this.config.proxy.http
- opts.agent = httpAgent
+ // request will not pay attention to the NOPROXY environment variable if a
+ // config value named proxy is passed in, even if it's set to null.
+ var proxy
+ if (uri.protocol === "https:") {
+ proxy = this.config.proxy.https
+ }
+ else {
+ proxy = this.config.proxy.http
+ }
+ if (typeof proxy === "string") opts.proxy = proxy
}
- if (typeof proxy === "string") opts.proxy = proxy
headers.version = this.version || pkg.version
headers.accept = accept
@@ -49,3 +56,30 @@ function initialize (uri, method, accept, headers) {
return opts
}
+
+function getAgent (protocol, config) {
+ if (protocol === "https:") {
+ if (!httpsAgent) {
+ httpsAgent = new HttpsAgent({
+ keepAlive : true,
+ localAddress : config.proxy.localAddress,
+ rejectUnauthorized : config.ssl.strict,
+ ca : config.ssl.ca,
+ cert : config.ssl.cert,
+ key : config.ssl.key
+ })
+ }
+
+ return httpsAgent
+ }
+ else {
+ if (!httpAgent) {
+ httpAgent = new HttpAgent({
+ keepAlive : true,
+ localAddress : config.proxy.localAddress
+ })
+ }
+
+ return httpAgent
+ }
+}
diff --git a/deps/npm/node_modules/npm-registry-client/lib/publish.js b/deps/npm/node_modules/npm-registry-client/lib/publish.js
index ea9dcaef74..348648b2ee 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/publish.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/publish.js
@@ -17,6 +17,12 @@ function publish (uri, params, cb) {
assert(params && typeof params === "object", "must pass params to publish")
assert(typeof cb === "function", "must pass callback to publish")
+ var access = params.access
+ assert(
+ (!access) || ["public", "restricted"].indexOf(access) !== -1,
+ "if present, access level must be either 'public' or 'restricted'"
+ )
+
var auth = params.auth
assert(auth && typeof auth === "object", "must pass auth to publish")
if (!(auth.token ||
@@ -46,13 +52,13 @@ function publish (uri, params, cb) {
assert(body instanceof Stream, "package body passed to publish must be a stream")
var client = this
var sink = concat(function (tarbuffer) {
- putFirst.call(client, uri, metadata, tarbuffer, auth, cb)
+ putFirst.call(client, uri, metadata, tarbuffer, access, auth, cb)
})
sink.on("error", cb)
body.pipe(sink)
}
-function putFirst (registry, data, tarbuffer, auth, cb) {
+function putFirst (registry, data, tarbuffer, access, auth, cb) {
// optimistically try to PUT all in one single atomic thing.
// If 409, then GET and merge, try again.
// If other error, then fail.
@@ -66,6 +72,8 @@ function putFirst (registry, data, tarbuffer, auth, cb) {
, readme: data.readme || ""
}
+ if (access) root.access = access
+
if (!auth.token) {
root.maintainers = [{name : auth.username, email : auth.email}]
data.maintainers = JSON.parse(JSON.stringify(root.maintainers))
diff --git a/deps/npm/node_modules/npm-registry-client/lib/request.js b/deps/npm/node_modules/npm-registry-client/lib/request.js
index fa969ac223..c2a7944e9f 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/request.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/request.js
@@ -123,7 +123,7 @@ function makeRequest (uri, params, cb_) {
if (params.lastModified && params.method === "GET") {
this.log.verbose("lastModified", params.lastModified)
- headers["if-modified-since"] = params.lastModified;
+ headers["if-modified-since"] = params.lastModified
}
// figure out wth body is
@@ -226,8 +226,8 @@ function requestDone (method, where, cb) {
parsed._etag = response.headers.etag
}
- if (parsed && response.headers['last-modified']) {
- parsed._lastModified = response.headers['last-modified']
+ if (parsed && response.headers["last-modified"]) {
+ parsed._lastModified = response.headers["last-modified"]
}
// for the search endpoint, the "error" property can be an object
diff --git a/deps/npm/node_modules/npm-registry-client/lib/tag.js b/deps/npm/node_modules/npm-registry-client/lib/tag.js
index 8b42199075..cad5154d7f 100644
--- a/deps/npm/node_modules/npm-registry-client/lib/tag.js
+++ b/deps/npm/node_modules/npm-registry-client/lib/tag.js
@@ -9,7 +9,10 @@ function tag (uri, params, cb) {
assert(typeof params.version === "string", "must pass version to tag")
assert(typeof params.tag === "string", "must pass tag name to tag")
- assert(params.auth && typeof params.auth === "object", "must pass auth to tag")
+ assert(
+ params.auth && typeof params.auth === "object",
+ "must pass auth to tag"
+ )
var options = {
method : "PUT",
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/LICENSE b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/LICENSE
new file mode 100644
index 0000000000..05eeeb88c2
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+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/npm-registry-client/node_modules/npm-package-arg/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/README.md
new file mode 100644
index 0000000000..21683f5e59
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/README.md
@@ -0,0 +1,101 @@
+# npm-package-arg
+
+Parse package name and specifier passed to commands like `npm install` or
+`npm cache add`. This just parses the text given-- it's worth noting that
+`npm` has further logic it applies by looking at your disk to figure out
+what ambiguous specifiers are. If you want that logic, please see
+[realize-package-specifier].
+
+[realize-package-specifier]: https://www.npmjs.org/package/realize-package-specifier
+
+Arguments look like: `foo@1.2`, `@bar/foo@1.2`, `foo@user/foo`, `http://x.com/foo.tgz`,
+`git+https://github.com/user/foo`, `bitbucket:user/foo`, `foo.tar.gz` or `bar`
+
+## EXAMPLES
+
+```javascript
+var assert = require("assert")
+var npa = require("npm-package-arg")
+
+// Pass in the descriptor, and it'll return an object
+var parsed = npa("@bar/foo@1.2")
+
+// Returns an object like:
+{
+ raw: '@bar/foo@1.2', // what was passed in
+ name: "foo", // the name of the package
+ scope: "@bar", // the private scope of the package, or null
+ type: "range", // the type of specifier this is
+ spec: ">=1.2.0 <1.3.0" // the expanded specifier
+ rawSpec: "1.2" // the specifier as passed in
+ }
+
+// Parsing urls pointing at hosted git services produces a variation:
+var parsed = npa("git+https://github.com/user/foo")
+
+// Returns an object like:
+{
+ raw: 'git+https://github.com/user/foo',
+ scope: null,
+ name: null,
+ rawSpec: 'git+https://github.com/user/foo',
+ spec: 'user/foo',
+ type: 'hosted',
+ hosted: {
+ type: 'github',
+ ssh: 'git@github.com:user/foo.git',
+ sshurl: 'git+ssh://git@github.com/user/foo.git',
+ https: 'https://github.com/user/foo.git',
+ directUrl: 'https://raw.githubusercontent.com/user/foo/master/package.json'
+ }
+}
+
+// Completely unreasonable invalid garbage throws an error
+// Make sure you wrap this in a try/catch if you have not
+// already sanitized the inputs!
+assert.throws(function() {
+ npa("this is not \0 a valid package name or url")
+})
+```
+
+## USING
+
+`var npa = require('npm-package-arg')`
+
+* var result = npa(*arg*)
+
+Parses *arg* and returns a result object detailing what *arg* is.
+
+*arg* -- a package descriptor, like: `foo@1.2`, or `foo@user/foo`, or
+`http://x.com/foo.tgz`, or `git+https://github.com/user/foo`
+
+## RESULT OBJECT
+
+The objects that are returned by npm-package-arg contain the following
+keys:
+
+* `name` - If known, the `name` field expected in the resulting pkg.
+* `type` - One of the following strings:
+ * `git` - A git repo
+ * `hosted` - A hosted project, from github, bitbucket or gitlab. Originally
+ either a full url pointing at one of these services or a shorthand like
+ `user/project` or `github:user/project` for github or `bitbucket:user/project`
+ for bitbucket.
+ * `tag` - A tagged version, like `"foo@latest"`
+ * `version` - A specific version number, like `"foo@1.2.3"`
+ * `range` - A version range, like `"foo@2.x"`
+ * `local` - A local file or folder path
+ * `remote` - An http url (presumably to a tgz)
+* `spec` - The "thing". URL, the range, git repo, etc.
+* `hosted` - If type=hosted this will be an object with the following keys:
+ * `type` - github, bitbucket or gitlab
+ * `ssh` - The ssh path for this git repo
+ * `sshUrl` - The ssh URL for this git repo
+ * `httpsUrl` - The HTTPS URL for this git repo
+ * `directUrl` - The URL for the package.json in this git repo
+* `raw` - The original un-modified string that was provided.
+* `rawSpec` - The part after the `name@...`, as it was originally
+ provided.
+* `scope` - If a name is something like `@org/module` then the `scope`
+ field will be set to `org`. If it doesn't have a scoped name, then
+ scope is `null`.
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/.npmignore b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/.npmignore
new file mode 100644
index 0000000000..58e97a7875
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/.npmignore
@@ -0,0 +1,3 @@
+*~
+.#
+node_modules
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/.travis.yml b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/.travis.yml
new file mode 100644
index 0000000000..7dc6619174
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - "0.11"
+ - "0.10"
+script: "npm test"
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/README.md b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/README.md
new file mode 100644
index 0000000000..ebf40a2ab2
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/README.md
@@ -0,0 +1,82 @@
+# 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.
+
+For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")`
+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/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/index.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/index.js
new file mode 100644
index 0000000000..c2ad10a3bc
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/index.js
@@ -0,0 +1,208 @@
+"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]
+ 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)
+ }
+ 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 matches[0]
+}
+
+function maybeGitHubShorthand(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
+ //
+ // The only way to do this properly would be to shell out to
+ // git-check-ref-format, and as this is a fast sync function,
+ // we don't want to do that. Just let git fail if it turns
+ // out that the commit-ish is invalid.
+ // GH usernames cannot start with . or -
+ return /^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(arg)
+}
+
+var parseGitUrl = function (giturl) {
+ if (typeof giturl != "string") giturl = "" + giturl
+ var matched = giturl.match(/^([^@]+)@([^:]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/)
+ if (! matched) return url.parse(giturl)
+ return {
+ protocol: "git+ssh:",
+ slashes: true,
+ auth: matched[1],
+ host: matched[2],
+ port: null,
+ hostname: matched[2],
+ hash: matched[4],
+ search: null,
+ query: null,
+ 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/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/package.json
new file mode 100644
index 0000000000..00606f6a46
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/package.json
@@ -0,0 +1,55 @@
+{
+ "name": "hosted-git-info",
+ "version": "1.5.3",
+ "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
+ "main": "index.js",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/hosted-git-info.git"
+ },
+ "keywords": [
+ "git",
+ "github",
+ "bitbucket",
+ "gitlab"
+ ],
+ "author": {
+ "name": "Rebecca Turner",
+ "email": "me@re-becca.org",
+ "url": "http://re-becca.org"
+ },
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/npm/hosted-git-info/issues"
+ },
+ "homepage": "https://github.com/npm/hosted-git-info",
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "devDependencies": {
+ "tap": "^0.4.13"
+ },
+ "gitHead": "153325f997813ebf8a7ae07b322b4fa89aa25f7d",
+ "_id": "hosted-git-info@1.5.3",
+ "_shasum": "1f46e25e9c0e207852fb7a4b94422ed5f09a03f5",
+ "_from": "hosted-git-info@>=1.5.3 <2.0.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!"
+}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/basic.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/basic.js
new file mode 100644
index 0000000000..e56ef9a05a
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/basic.js
@@ -0,0 +1,9 @@
+"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()
+})
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/bitbucket.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/bitbucket.js
new file mode 100644
index 0000000000..089cb28190
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/bitbucket.js
@@ -0,0 +1,24 @@
+"use strict"
+var HostedGit = require("../index")
+var test = require("tap").test
+
+test("fromUrl(bitbucket url)", 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(), "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" )
+ }
+
+ require('./lib/standard-tests')(verify, "bitbucket.org", "bitbucket")
+
+ t.end()
+})
+
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/gist.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/gist.js
new file mode 100644
index 0000000000..a316048cb7
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/gist.js
@@ -0,0 +1,40 @@
+"use strict"
+var HostedGit = require("../index")
+var test = require("tap").test
+
+
+test("fromUrl(gist url)", 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(), "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.user) {
+ 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@/")
+ 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")
+
+ t.end()
+})
+
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/github.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/github.js
new file mode 100644
index 0000000000..e551c45d7b
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/github.js
@@ -0,0 +1,42 @@
+"use strict"
+var HostedGit = require("../index")
+var test = require("tap").test
+
+
+test("fromUrl(github url)", 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(), "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" )
+ }
+
+ // github shorturls
+ 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("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")
+
+ t.end()
+})
+
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/gitlab.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/gitlab.js
new file mode 100644
index 0000000000..1a4e07096c
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/gitlab.js
@@ -0,0 +1,25 @@
+"use strict"
+var HostedGit = require("../index")
+var test = require("tap").test
+
+
+test("fromUrl(gitlab url)", 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(), "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" )
+ }
+
+ require('./lib/standard-tests')(verify, "gitlab.com", "gitlab")
+
+ t.end()
+})
+
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/lib/standard-tests.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/lib/standard-tests.js
new file mode 100644
index 0000000000..c505342fa0
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/node_modules/hosted-git-info/test/lib/standard-tests.js
@@ -0,0 +1,28 @@
+"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("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+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")
+}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/npa.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/npa.js
new file mode 100644
index 0000000000..883c5401b4
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/npa.js
@@ -0,0 +1,181 @@
+var url = require("url")
+var assert = require("assert")
+var util = require("util")
+var semver = require("semver")
+var path = require("path")
+var HostedGit = require("hosted-git-info")
+
+module.exports = npa
+
+var isWindows = process.platform === "win32" || global.FAKE_WINDOWS
+var slashRe = isWindows ? /\\|[/]/ : /[/]/
+
+var parseName = /^(?:@([^/]+?)[/])?([^/]+?)$/
+var nameAt = /^(@([^/]+?)[/])?([^/]+?)@/
+var debug = util.debuglog ? util.debuglog("npa")
+ : /\bnpa\b/i.test(process.env.NODE_DEBUG || "")
+ ? function () {
+ console.error("NPA: " + util.format.apply(util, arguments).split("\n").join("\nNPA: "))
+ } : function () {}
+
+function validName (name) {
+ if (!name) {
+ debug("not a name %j", name)
+ return false
+ }
+ var n = name.trim()
+ if (!n || n.charAt(0) === "."
+ || !n.match(/^[a-zA-Z0-9]/)
+ || n.match(/[/()&?#|<>@:%\s\\*'"!~`]/)
+ || n.toLowerCase() === "node_modules"
+ || n !== encodeURIComponent(n)
+ || n.toLowerCase() === "favicon.ico") {
+ debug("not a valid name %j", name)
+ return false
+ }
+ return n
+}
+
+function npa (arg) {
+ assert.equal(typeof arg, "string")
+ arg = arg.trim()
+
+ var res = new Result
+ res.raw = arg
+ res.scope = null
+
+ // See if it's something like foo@...
+ var nameparse = arg.match(nameAt)
+ debug("nameparse", nameparse)
+ if (nameparse && validName(nameparse[3]) &&
+ (!nameparse[2] || validName(nameparse[2]))) {
+ res.name = (nameparse[1] || "") + nameparse[3]
+ if (nameparse[2])
+ res.scope = "@" + nameparse[2]
+ arg = arg.substr(nameparse[0].length)
+ } else {
+ res.name = null
+ }
+
+ res.rawSpec = arg
+ res.spec = arg
+
+ var urlparse = url.parse(arg)
+ debug("urlparse", urlparse)
+
+ // windows paths look like urls
+ // don't be fooled!
+ if (isWindows && urlparse && urlparse.protocol &&
+ urlparse.protocol.match(/^[a-zA-Z]:$/)) {
+ debug("windows url-ish local path", urlparse)
+ urlparse = {}
+ }
+
+ if (urlparse.protocol || HostedGit.fromUrl(arg)) {
+ return parseUrl(res, arg, urlparse)
+ }
+
+ // at this point, it's not a url, and not hosted
+ // If it's a valid name, and doesn't already have a name, then assume
+ // $name@"" range
+ //
+ // if it's got / chars in it, then assume that it's local.
+
+ if (res.name) {
+ var version = semver.valid(arg, true)
+ var range = semver.validRange(arg, true)
+ // foo@...
+ if (version) {
+ res.spec = version
+ res.type = "version"
+ } else if (range) {
+ res.spec = range
+ res.type = "range"
+ } else if (slashRe.test(arg)) {
+ parseLocal(res, arg)
+ } else {
+ res.type = "tag"
+ res.spec = arg
+ }
+ } else {
+ var p = arg.match(parseName)
+ if (p && validName(p[2]) &&
+ (!p[1] || validName(p[1]))) {
+ res.type = "range"
+ res.spec = "*"
+ res.rawSpec = ""
+ res.name = arg
+ if (p[1])
+ res.scope = "@" + p[1]
+ } else {
+ parseLocal(res, arg)
+ }
+ }
+
+ return res
+}
+
+function parseLocal (res, arg) {
+ // turns out nearly every character is allowed in fs paths
+ if (/\0/.test(arg)) {
+ throw new Error("Invalid Path: " + JSON.stringify(arg))
+ }
+ res.type = "local"
+ res.spec = path.resolve(arg)
+}
+
+function parseUrl (res, arg, urlparse) {
+ var gitHost = HostedGit.fromUrl(arg)
+ if (gitHost) {
+ res.type = "hosted"
+ res.spec = gitHost.toString(),
+ res.hosted = {
+ type: gitHost.type,
+ ssh: gitHost.ssh(),
+ sshUrl: gitHost.sshurl(),
+ httpsUrl: gitHost.https(),
+ directUrl: gitHost.file("package.json")
+ }
+ return res
+ }
+ // check the protocol, and then see if it's git or not
+ switch (urlparse.protocol) {
+ case "git:":
+ case "git+http:":
+ case "git+https:":
+ case "git+rsync:":
+ case "git+ftp:":
+ case "git+ssh:":
+ case "git+file:":
+ res.type = "git"
+ res.spec = arg.replace(/^git[+]/, "")
+ break
+
+ case "http:":
+ case "https:":
+ res.type = "remote"
+ res.spec = arg
+ break
+
+ case "file:":
+ res.type = "local"
+ res.spec = urlparse.pathname
+ break
+
+ default:
+ throw new Error("Unsupported URL Type: " + arg)
+ break
+ }
+
+ return res
+}
+
+
+function Result () {
+ if (!(this instanceof Result)) return new Result
+}
+Result.prototype.name = null
+Result.prototype.type = null
+Result.prototype.spec = null
+Result.prototype.raw = null
+Result.prototype.hosted = null
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/package.json
new file mode 100644
index 0000000000..ad8c540f32
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "npm-package-arg",
+ "version": "3.1.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",
+ "semver": "4"
+ },
+ "devDependencies": {
+ "tap": "^0.4.9"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/npm/npm-package-arg"
+ },
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "ISC",
+ "bugs": {
+ "url": "https://github.com/npm/npm-package-arg/issues"
+ },
+ "homepage": "https://github.com/npm/npm-package-arg",
+ "gitHead": "3d5c7f91c5e90e4b9792d881080c462f718f4747",
+ "_id": "npm-package-arg@3.1.0",
+ "_shasum": "8ce9d8ad83ae9fcc433783ca813e4e91f885703e",
+ "_from": "npm-package-arg@>=3.0.0 <4.0.0",
+ "_npmVersion": "2.4.1",
+ "_nodeVersion": "1.0.4",
+ "_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": "8ce9d8ad83ae9fcc433783ca813e4e91f885703e",
+ "tarball": "http://registry.npmjs.org/npm-package-arg/-/npm-package-arg-3.1.0.tgz"
+ },
+ "_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-3.1.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/basic.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/basic.js
new file mode 100644
index 0000000000..4991ffcd3e
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/basic.js
@@ -0,0 +1,168 @@
+var npa = require("../npa.js")
+var path = require("path")
+
+require("tap").test("basic", function (t) {
+ t.setMaxListeners(999)
+
+ var tests = {
+ "foo@1.2": {
+ name: "foo",
+ type: "range",
+ spec: ">=1.2.0 <1.3.0",
+ raw: "foo@1.2",
+ rawSpec: "1.2"
+ },
+
+ "@foo/bar": {
+ raw: "@foo/bar",
+ name: "@foo/bar",
+ scope: "@foo",
+ rawSpec: "",
+ spec: "*",
+ type: "range"
+ },
+
+ "@foo/bar@": {
+ raw: "@foo/bar@",
+ name: "@foo/bar",
+ scope: "@foo",
+ rawSpec: "",
+ spec: "*",
+ type: "range"
+ },
+
+ "@foo/bar@baz": {
+ raw: "@foo/bar@baz",
+ name: "@foo/bar",
+ scope: "@foo",
+ rawSpec: "baz",
+ spec: "baz",
+ type: "tag"
+ },
+
+ "@f fo o al/ a d s ;f ": {
+ raw: "@f fo o al/ a d s ;f",
+ name: null,
+ rawSpec: "@f fo o al/ a d s ;f",
+ spec: path.resolve("@f fo o al/ a d s ;f"),
+ type: "local"
+ },
+
+ "foo@1.2.3": {
+ name: "foo",
+ type: "version",
+ spec: "1.2.3",
+ raw: "foo@1.2.3"
+ },
+
+ "foo@=v1.2.3": {
+ name: "foo",
+ type: "version",
+ spec: "1.2.3",
+ raw: "foo@=v1.2.3",
+ rawSpec: "=v1.2.3"
+ },
+
+ "git+ssh://git@notgithub.com/user/foo#1.2.3": {
+ name: null,
+ type: "git",
+ spec: "ssh://git@notgithub.com/user/foo#1.2.3",
+ raw: "git+ssh://git@notgithub.com/user/foo#1.2.3"
+ },
+
+ "git+file://path/to/repo#1.2.3": {
+ name: null,
+ type: "git",
+ spec: "file://path/to/repo#1.2.3",
+ raw: "git+file://path/to/repo#1.2.3"
+ },
+
+ "git://notgithub.com/user/foo": {
+ name: null,
+ type: "git",
+ spec: "git://notgithub.com/user/foo",
+ raw: "git://notgithub.com/user/foo"
+ },
+
+ "@foo/bar@git+ssh://notgithub.com/user/foo": {
+ name: "@foo/bar",
+ scope: "@foo",
+ spec: "ssh://notgithub.com/user/foo",
+ rawSpec: "git+ssh://notgithub.com/user/foo",
+ raw: "@foo/bar@git+ssh://notgithub.com/user/foo"
+ },
+
+ "/path/to/foo": {
+ name: null,
+ type: "local",
+ spec: "/path/to/foo",
+ raw: "/path/to/foo"
+ },
+
+ "file:path/to/foo": {
+ name: null,
+ type: "local",
+ spec: "path/to/foo",
+ raw: "file:path/to/foo"
+ },
+
+ "file:~/path/to/foo": {
+ name: null,
+ type: "local",
+ spec: "~/path/to/foo",
+ raw: "file:~/path/to/foo"
+ },
+
+ "file:../path/to/foo": {
+ name: null,
+ type: "local",
+ spec: "../path/to/foo",
+ raw: "file:../path/to/foo"
+ },
+
+ "file:///path/to/foo": {
+ name: null,
+ type: "local",
+ spec: "/path/to/foo",
+ raw: "file:///path/to/foo"
+ },
+
+ "https://server.com/foo.tgz": {
+ name: null,
+ type: "remote",
+ spec: "https://server.com/foo.tgz",
+ raw: "https://server.com/foo.tgz"
+ },
+
+ "foo@latest": {
+ name: "foo",
+ type: "tag",
+ spec: "latest",
+ raw: "foo@latest"
+ },
+
+ "foo": {
+ name: "foo",
+ type: "range",
+ spec: "*",
+ raw: "foo"
+ }
+ }
+
+ Object.keys(tests).forEach(function (arg) {
+ var res = npa(arg)
+ t.type(res, "Result", arg + " is result")
+ t.has(res, tests[arg], arg + " matches expectations")
+ })
+
+ // Completely unreasonable invalid garbage throws an error
+ t.throws(function() {
+ npa("this is not a \0 valid package name or url")
+ })
+
+ t.throws(function() {
+ npa("gopher://yea right")
+ }, "Unsupported URL Type: gopher://yea right")
+
+ t.end()
+})
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/bitbucket.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/bitbucket.js
new file mode 100644
index 0000000000..48bbdbcf9b
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/bitbucket.js
@@ -0,0 +1,82 @@
+var npa = require("../npa.js")
+var path = require("path")
+
+require("tap").test("basic", function (t) {
+ t.setMaxListeners(999)
+
+ var tests = {
+ "bitbucket:user/foo-js": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "bitbucket" },
+ spec: "git+ssh://git@bitbucket.org/user/foo-js.git",
+ raw: "bitbucket:user/foo-js"
+ },
+
+ "bitbucket:user/foo-js#bar/baz": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "bitbucket" },
+ spec: "git+ssh://git@bitbucket.org/user/foo-js.git#bar/baz",
+ raw: "bitbucket:user/foo-js#bar/baz"
+ },
+
+ "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "bitbucket" },
+ spec: "git+ssh://git@bitbucket.org/user..blerg--/..foo-js.git# . . . . . some . tags / / /",
+ raw: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /"
+ },
+
+ "bitbucket:user/foo-js#bar/baz/bin": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "bitbucket" },
+ spec: "git+ssh://git@bitbucket.org/user/foo-js.git#bar/baz/bin",
+ raw: "bitbucket:user/foo-js#bar/baz/bin"
+ },
+
+ "foo@bitbucket:user/foo-js": {
+ name: "foo",
+ type: "hosted",
+ hosted: { type: "bitbucket" },
+ spec: "git+ssh://git@bitbucket.org/user/foo-js.git",
+ raw: "foo@bitbucket:user/foo-js"
+ },
+
+ "git+ssh://git@bitbucket.org/user/foo#1.2.3": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "bitbucket" },
+ spec: "git+ssh://git@bitbucket.org/user/foo.git#1.2.3",
+ raw: "git+ssh://git@bitbucket.org/user/foo#1.2.3"
+ },
+
+ "https://bitbucket.org/user/foo.git": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "bitbucket" },
+ spec: "git+ssh://git@bitbucket.org/user/foo.git",
+ raw: "https://bitbucket.org/user/foo.git"
+ },
+
+ "@foo/bar@git+ssh://bitbucket.org/user/foo": {
+ name: "@foo/bar",
+ scope: "@foo",
+ type: "hosted",
+ hosted: { type: "bitbucket" },
+ spec: "git+ssh://git@bitbucket.org/user/foo.git",
+ rawSpec: "git+ssh://bitbucket.org/user/foo",
+ raw: "@foo/bar@git+ssh://bitbucket.org/user/foo"
+ }
+ }
+
+ Object.keys(tests).forEach(function (arg) {
+ var res = npa(arg)
+ t.type(res, "Result", arg + " is a result")
+ t.has(res, tests[arg], arg + " matches expectations")
+ })
+
+ t.end()
+})
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/github.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/github.js
new file mode 100644
index 0000000000..63fd26c10a
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/github.js
@@ -0,0 +1,106 @@
+var npa = require("../npa.js")
+var path = require("path")
+
+require("tap").test("basic", function (t) {
+ t.setMaxListeners(999)
+
+ var tests = {
+ "user/foo-js": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "github" },
+ spec: "git+ssh://git@github.com/user/foo-js.git",
+ raw: "user/foo-js"
+ },
+
+ "user/foo-js#bar/baz": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "github" },
+ spec: "git+ssh://git@github.com/user/foo-js.git#bar/baz",
+ raw: "user/foo-js#bar/baz"
+ },
+
+ "user..blerg--/..foo-js# . . . . . some . tags / / /": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "github" },
+ spec: "git+ssh://git@github.com/user..blerg--/..foo-js.git# . . . . . some . tags / / /",
+ raw: "user..blerg--/..foo-js# . . . . . some . tags / / /"
+ },
+
+ "user/foo-js#bar/baz/bin": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "github" },
+ spec: "git+ssh://git@github.com/user/foo-js.git#bar/baz/bin",
+ raw: "user/foo-js#bar/baz/bin"
+ },
+
+ "foo@user/foo-js": {
+ name: "foo",
+ type: "hosted",
+ hosted: { type: "github" },
+ spec: "git+ssh://git@github.com/user/foo-js.git",
+ raw: "foo@user/foo-js"
+ },
+
+ "github:user/foo-js": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "github" },
+ spec: "git+ssh://git@github.com/user/foo-js.git",
+ raw: "github:user/foo-js"
+ },
+
+ "git+ssh://git@github.com/user/foo#1.2.3": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "github" },
+ spec: "git+ssh://git@github.com/user/foo.git#1.2.3",
+ raw: "git+ssh://git@github.com/user/foo#1.2.3"
+ },
+
+ "git://github.com/user/foo": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "github" },
+ spec: "git+ssh://git@github.com/user/foo.git",
+ raw: "git://github.com/user/foo"
+ },
+
+ "https://github.com/user/foo.git": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "github" },
+ spec: "git+ssh://git@github.com/user/foo.git",
+ raw: "https://github.com/user/foo.git"
+ },
+
+ "@foo/bar@git+ssh://github.com/user/foo": {
+ name: "@foo/bar",
+ scope: "@foo",
+ type: "hosted",
+ hosted: { type: "github" },
+ spec: "git+ssh://git@github.com/user/foo.git",
+ rawSpec: "git+ssh://github.com/user/foo",
+ raw: "@foo/bar@git+ssh://github.com/user/foo"
+ },
+
+ "foo@bar/foo": {
+ name: "foo",
+ type: "hosted",
+ hosted: { type: "github" },
+ spec: "git+ssh://git@github.com/bar/foo.git",
+ raw: "foo@bar/foo"
+ }
+ }
+
+ Object.keys(tests).forEach(function (arg) {
+ var res = npa(arg)
+ t.type(res, "Result", arg + " is a result")
+ t.has(res, tests[arg], arg + " matches expectations")
+ })
+
+ t.end()
+})
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/gitlab.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/gitlab.js
new file mode 100644
index 0000000000..36ea016db7
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/gitlab.js
@@ -0,0 +1,82 @@
+var npa = require("../npa.js")
+var path = require("path")
+
+require("tap").test("basic", function (t) {
+ t.setMaxListeners(999)
+
+ var tests = {
+ "gitlab:user/foo-js": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "gitlab" },
+ spec: "git+ssh://git@gitlab.com/user/foo-js.git",
+ raw: "gitlab:user/foo-js"
+ },
+
+ "gitlab:user/foo-js#bar/baz": {
+ 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"
+ },
+
+ "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "gitlab" },
+ spec: "git+ssh://git@gitlab.com/user..blerg--/..foo-js.git# . . . . . some . tags / / /",
+ raw: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /"
+ },
+
+ "gitlab:user/foo-js#bar/baz/bin": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "gitlab" },
+ spec: "git+ssh://git@gitlab.com/user/foo-js.git#bar/baz/bin",
+ raw: "gitlab:user/foo-js#bar/baz/bin"
+ },
+
+ "foo@gitlab:user/foo-js": {
+ name: "foo",
+ type: "hosted",
+ hosted: { type: "gitlab" },
+ spec: "git+ssh://git@gitlab.com/user/foo-js.git",
+ raw: "foo@gitlab:user/foo-js"
+ },
+
+ "git+ssh://git@gitlab.com/user/foo#1.2.3": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "gitlab" },
+ spec: "git+ssh://git@gitlab.com/user/foo.git#1.2.3",
+ raw: "git+ssh://git@gitlab.com/user/foo#1.2.3"
+ },
+
+ "https://gitlab.com/user/foo.git": {
+ name: null,
+ type: "hosted",
+ hosted: { type: "gitlab" },
+ spec: "git+ssh://git@gitlab.com/user/foo.git",
+ raw: "https://gitlab.com/user/foo.git"
+ },
+
+ "@foo/bar@git+ssh://gitlab.com/user/foo": {
+ name: "@foo/bar",
+ scope: "@foo",
+ type: "hosted",
+ hosted: { type: "gitlab" },
+ spec: "git+ssh://git@gitlab.com/user/foo.git",
+ rawSpec: "git+ssh://gitlab.com/user/foo",
+ raw: "@foo/bar@git+ssh://gitlab.com/user/foo"
+ }
+ }
+
+ Object.keys(tests).forEach(function (arg) {
+ var res = npa(arg)
+ t.type(res, "Result", arg + " is a result")
+ t.has(res, tests[arg], arg + " matches expectations")
+ })
+
+ t.end()
+})
diff --git a/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/windows.js b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/windows.js
new file mode 100644
index 0000000000..e3c8ba6b59
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/node_modules/npm-package-arg/test/windows.js
@@ -0,0 +1,41 @@
+global.FAKE_WINDOWS = true
+
+var npa = require("../npa.js")
+var test = require("tap").test
+var path = require("path")
+
+var cases = {
+ "C:\\x\\y\\z": {
+ raw: "C:\\x\\y\\z",
+ scope: null,
+ name: null,
+ rawSpec: "C:\\x\\y\\z",
+ spec: path.resolve("C:\\x\\y\\z"),
+ type: "local"
+ },
+ "foo@C:\\x\\y\\z": {
+ raw: "foo@C:\\x\\y\\z",
+ scope: null,
+ name: "foo",
+ rawSpec: "C:\\x\\y\\z",
+ spec: path.resolve("C:\\x\\y\\z"),
+ type: "local"
+ },
+ "foo@/foo/bar/baz": {
+ raw: "foo@/foo/bar/baz",
+ scope: null,
+ name: "foo",
+ rawSpec: "/foo/bar/baz",
+ spec: path.resolve("/foo/bar/baz"),
+ type: "local"
+ }
+}
+
+test("parse a windows path", function (t) {
+ Object.keys(cases).forEach(function (c) {
+ var expect = cases[c]
+ var actual = npa(c)
+ t.same(actual, expect, c)
+ })
+ t.end()
+})
diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json
index 9d4178c572..0cd832ad7d 100644
--- a/deps/npm/node_modules/npm-registry-client/package.json
+++ b/deps/npm/node_modules/npm-registry-client/package.json
@@ -6,7 +6,7 @@
},
"name": "npm-registry-client",
"description": "Client for the npm registry",
- "version": "5.0.0",
+ "version": "6.0.7",
"repository": {
"url": "git://github.com/isaacs/npm-registry-client"
},
@@ -20,6 +20,7 @@
"graceful-fs": "^3.0.0",
"mkdirp": "^0.5.0",
"normalize-package-data": "~1.0.1",
+ "npm-package-arg": "^3.0.0",
"once": "^1.3.0",
"request": "^2.47.0",
"retry": "^0.6.1",
@@ -37,14 +38,14 @@
"npmlog": ""
},
"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.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.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 * `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} Cerficate 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",
+ "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": "b22f38992087e57f263c269dcd52ff290565d401",
+ "gitHead": "8691eaf8ca1f4c8a4d16389da6e8f6d0a0042ed9",
"bugs": {
"url": "https://github.com/isaacs/npm-registry-client/issues"
},
"homepage": "https://github.com/isaacs/npm-registry-client",
- "_id": "npm-registry-client@5.0.0",
- "_shasum": "0425db2fc3dcd322e74fe95029d2c49a41e4b6cf",
- "_from": "npm-registry-client@>=5.0.0 <5.1.0"
+ "_id": "npm-registry-client@6.0.7",
+ "_shasum": "c9f36f727f0b72f47a9ed11a539829770565e0fb",
+ "_from": "npm-registry-client@>=6.0.7 <6.1.0"
}
diff --git a/deps/npm/node_modules/npm-registry-client/test/access.js b/deps/npm/node_modules/npm-registry-client/test/access.js
new file mode 100644
index 0000000000..52ecdda4a4
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/access.js
@@ -0,0 +1,96 @@
+var test = require("tap").test
+
+var server = require("./lib/server.js")
+var common = require("./lib/common.js")
+var client = common.freshClient()
+
+function nop() {}
+
+var URI = "http://localhost:1337/-/package/underscore/access"
+var TOKEN = "foo"
+var AUTH = {
+ token : TOKEN
+}
+var LEVEL = "public"
+var PARAMS = {
+ level : LEVEL,
+ auth : AUTH
+}
+
+test("access call contract", function (t) {
+ t.throws(function () {
+ client.access(undefined, AUTH, nop)
+ }, "requires a URI")
+
+ t.throws(function () {
+ client.access([], PARAMS, nop)
+ }, "requires URI to be a string")
+
+ t.throws(function () {
+ client.access(URI, undefined, nop)
+ }, "requires params object")
+
+ t.throws(function () {
+ client.access(URI, "", nop)
+ }, "params must be object")
+
+ t.throws(function () {
+ client.access(URI, PARAMS, undefined)
+ }, "requires callback")
+
+ t.throws(function () {
+ client.access(URI, PARAMS, "callback")
+ }, "callback must be function")
+
+ t.throws(
+ function () {
+ var params = {
+ auth : AUTH
+ }
+ client.access(URI, params, nop)
+ },
+ { name : "AssertionError", message : "must pass level to access" },
+ "access must include level"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ level : LEVEL
+ }
+ client.access(URI, params, nop)
+ },
+ { name : "AssertionError", message : "must pass auth to access" },
+ "access must include auth"
+ )
+
+ t.end()
+})
+
+test("set access level on a package", function (t) {
+ server.expect("POST", "/-/package/underscore/access", function (req, res) {
+ t.equal(req.method, "POST")
+
+ var b = ""
+ req.setEncoding("utf8")
+ req.on("data", function (d) {
+ b += d
+ })
+
+ req.on("end", function () {
+ var updated = JSON.parse(b)
+
+ t.deepEqual(updated, { access : "public" })
+
+ res.statusCode = 201
+ res.json({accessChanged : true})
+ })
+ })
+
+ client.access(URI, PARAMS, function (error, data) {
+ t.ifError(error, "no errors")
+ t.ok(data.accessChanged, "access level set")
+
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/npm-registry-client/test/dist-tags-add.js b/deps/npm/node_modules/npm-registry-client/test/dist-tags-add.js
new file mode 100644
index 0000000000..a215c67d93
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/dist-tags-add.js
@@ -0,0 +1,141 @@
+var test = require("tap").test
+
+var server = require("./lib/server.js")
+var common = require("./lib/common.js")
+var client = common.freshClient()
+
+function nop() {}
+
+var BASE_URL = "http://localhost:1337/"
+var URI = "/-/package/underscore/dist-tags/test"
+var TOKEN = "foo"
+var AUTH = {
+ token : TOKEN
+}
+var PACKAGE = "underscore"
+var DIST_TAG = "test"
+var VERSION = "3.1.3"
+var PARAMS = {
+ package : PACKAGE,
+ distTag : DIST_TAG,
+ version : VERSION,
+ auth : AUTH
+}
+
+test("distTags.add call contract", function (t) {
+ t.throws(function () {
+ client.distTags.add(undefined, AUTH, nop)
+ }, "requires a URI")
+
+ t.throws(function () {
+ client.distTags.add([], PARAMS, nop)
+ }, "requires URI to be a string")
+
+ t.throws(function () {
+ client.distTags.add(BASE_URL, undefined, nop)
+ }, "requires params object")
+
+ t.throws(function () {
+ client.distTags.add(BASE_URL, "", nop)
+ }, "params must be object")
+
+ t.throws(function () {
+ client.distTags.add(BASE_URL, PARAMS, undefined)
+ }, "requires callback")
+
+ t.throws(function () {
+ client.distTags.add(BASE_URL, PARAMS, "callback")
+ }, "callback must be function")
+
+ t.throws(
+ function () {
+ var params = {
+ distTag : DIST_TAG,
+ version : VERSION,
+ auth : AUTH
+ }
+ client.distTags.add(BASE_URL, params, nop)
+ },
+ {
+ name : "AssertionError",
+ message : "must pass package name to distTags.add"
+ },
+ "distTags.add must include package name"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ package : PACKAGE,
+ version : VERSION,
+ auth : AUTH
+ }
+ client.distTags.add(BASE_URL, params, nop)
+ },
+ {
+ name : "AssertionError",
+ message : "must pass package distTag name to distTags.add"
+ },
+ "distTags.add must include dist-tag"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ package : PACKAGE,
+ distTag : DIST_TAG,
+ auth : AUTH
+ }
+ client.distTags.add(BASE_URL, params, nop)
+ },
+ {
+ name : "AssertionError",
+ message : "must pass version to be mapped to distTag to distTags.add"
+ },
+ "distTags.add must include version"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ package : PACKAGE,
+ distTag : DIST_TAG,
+ version : VERSION
+ }
+ client.distTags.add(BASE_URL, params, nop)
+ },
+ { name : "AssertionError", message : "must pass auth to distTags.add" },
+ "distTags.add must include auth"
+ )
+
+ t.end()
+})
+
+test("add a new dist-tag to a package", function (t) {
+ server.expect("PUT", URI, function (req, res) {
+ t.equal(req.method, "PUT")
+
+ var b = ""
+ req.setEncoding("utf8")
+ req.on("data", function (d) {
+ b += d
+ })
+
+ req.on("end", function () {
+ t.doesNotThrow(function () {
+ var parsed = JSON.parse(b)
+ t.deepEqual(parsed, VERSION)
+
+ res.statusCode = 200
+ res.json({ "test" : VERSION })
+ }, "got valid JSON from client")
+ })
+ })
+
+ client.distTags.add(BASE_URL, PARAMS, function (error, data) {
+ t.ifError(error, "no errors")
+ t.ok(data.test, "dist-tag added")
+
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/npm-registry-client/test/dist-tags-fetch.js b/deps/npm/node_modules/npm-registry-client/test/dist-tags-fetch.js
new file mode 100644
index 0000000000..c108b6b392
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/dist-tags-fetch.js
@@ -0,0 +1,98 @@
+var test = require("tap").test
+
+var server = require("./lib/server.js")
+var common = require("./lib/common.js")
+var client = common.freshClient()
+
+function nop() {}
+
+var BASE_URL = "http://localhost:1337/"
+var URI = "/-/package/underscore/dist-tags"
+var TOKEN = "foo"
+var AUTH = {
+ token : TOKEN
+}
+var PACKAGE = "underscore"
+var PARAMS = {
+ package : PACKAGE,
+ auth : AUTH
+}
+
+test("distTags.fetch call contract", function (t) {
+ t.throws(function () {
+ client.distTags.fetch(undefined, AUTH, nop)
+ }, "requires a URI")
+
+ t.throws(function () {
+ client.distTags.fetch([], PARAMS, nop)
+ }, "requires URI to be a string")
+
+ t.throws(function () {
+ client.distTags.fetch(BASE_URL, undefined, nop)
+ }, "requires params object")
+
+ t.throws(function () {
+ client.distTags.fetch(BASE_URL, "", nop)
+ }, "params must be object")
+
+ t.throws(function () {
+ client.distTags.fetch(BASE_URL, PARAMS, undefined)
+ }, "requires callback")
+
+ t.throws(function () {
+ client.distTags.fetch(BASE_URL, PARAMS, "callback")
+ }, "callback must be function")
+
+ t.throws(
+ function () {
+ var params = {
+ auth : AUTH
+ }
+ client.distTags.fetch(BASE_URL, params, nop)
+ },
+ {
+ name : "AssertionError",
+ message : "must pass package name to distTags.fetch"
+ },
+ "distTags.fetch must include package name"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ package : PACKAGE
+ }
+ client.distTags.fetch(BASE_URL, params, nop)
+ },
+ { name : "AssertionError", message : "must pass auth to distTags.fetch" },
+ "distTags.fetch must include auth"
+ )
+
+ t.end()
+})
+
+test("fetch dist-tags for a package", function (t) {
+ server.expect("GET", URI, function (req, res) {
+ t.equal(req.method, "GET")
+
+ var b = ""
+ req.setEncoding("utf8")
+ req.on("data", function (d) {
+ b += d
+ })
+
+ req.on("end", function () {
+ t.notOk(b, "no request body")
+
+ res.statusCode = 200
+ res.json({ a : "1.0.0", b : "2.0.0", _etag : "xxx" })
+ })
+ })
+
+ client.distTags.fetch(BASE_URL, PARAMS, function (error, data) {
+ t.ifError(error, "no errors")
+ t.same(data, { a : "1.0.0", b : "2.0.0" }, "etag filtered from response")
+
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/npm-registry-client/test/dist-tags-rm.js b/deps/npm/node_modules/npm-registry-client/test/dist-tags-rm.js
new file mode 100644
index 0000000000..6268a06aaa
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/dist-tags-rm.js
@@ -0,0 +1,117 @@
+var test = require("tap").test
+
+var server = require("./lib/server.js")
+var common = require("./lib/common.js")
+var client = common.freshClient()
+
+function nop() {}
+
+var BASE_URL = "http://localhost:1337/"
+var URI = "/-/package/underscore/dist-tags/test"
+var TOKEN = "foo"
+var AUTH = {
+ token : TOKEN
+}
+var PACKAGE = "underscore"
+var DIST_TAG = "test"
+var PARAMS = {
+ package : PACKAGE,
+ distTag : DIST_TAG,
+ auth : AUTH
+}
+
+test("distTags.rm call contract", function (t) {
+ t.throws(function () {
+ client.distTags.rm(undefined, AUTH, nop)
+ }, "requires a URI")
+
+ t.throws(function () {
+ client.distTags.rm([], PARAMS, nop)
+ }, "requires URI to be a string")
+
+ t.throws(function () {
+ client.distTags.rm(BASE_URL, undefined, nop)
+ }, "requires params object")
+
+ t.throws(function () {
+ client.distTags.rm(BASE_URL, "", nop)
+ }, "params must be object")
+
+ t.throws(function () {
+ client.distTags.rm(BASE_URL, PARAMS, undefined)
+ }, "requires callback")
+
+ t.throws(function () {
+ client.distTags.rm(BASE_URL, PARAMS, "callback")
+ }, "callback must be function")
+
+ t.throws(
+ function () {
+ var params = {
+ distTag : DIST_TAG,
+ auth : AUTH
+ }
+ client.distTags.rm(BASE_URL, params, nop)
+ },
+ {
+ name : "AssertionError",
+ message : "must pass package name to distTags.rm"
+ },
+ "distTags.rm must include package name"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ package : PACKAGE,
+ auth : AUTH
+ }
+ client.distTags.rm(BASE_URL, params, nop)
+ },
+ {
+ name : "AssertionError",
+ message : "must pass package distTag name to distTags.rm"
+ },
+ "distTags.rm must include dist-tag"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ package : PACKAGE,
+ distTag : DIST_TAG
+ }
+ client.distTags.rm(BASE_URL, params, nop)
+ },
+ { name : "AssertionError", message : "must pass auth to distTags.rm" },
+ "distTags.rm must include auth"
+ )
+
+ t.end()
+})
+
+test("remove a dist-tag from a package", function (t) {
+ server.expect("DELETE", URI, function (req, res) {
+ t.equal(req.method, "DELETE")
+
+ var b = ""
+ req.setEncoding("utf8")
+ req.on("data", function (d) {
+ b += d
+ })
+
+ req.on("end", function () {
+ t.notOk(b, "got no message body")
+
+ res.statusCode = 200
+ res.json({})
+ })
+ })
+
+ client.distTags.rm(BASE_URL, PARAMS, function (error, data) {
+ t.ifError(error, "no errors")
+ t.notOk(data.test, "dist-tag removed")
+
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/npm-registry-client/test/dist-tags-set.js b/deps/npm/node_modules/npm-registry-client/test/dist-tags-set.js
new file mode 100644
index 0000000000..ff5591dbd2
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/dist-tags-set.js
@@ -0,0 +1,121 @@
+var test = require("tap").test
+
+var server = require("./lib/server.js")
+var common = require("./lib/common.js")
+var client = common.freshClient()
+
+function nop() {}
+
+var BASE_URL = "http://localhost:1337/"
+var URI = "/-/package/underscore/dist-tags"
+var TOKEN = "foo"
+var AUTH = {
+ token : TOKEN
+}
+var PACKAGE = "underscore"
+var DIST_TAGS = {
+ "a" : "8.0.8",
+ "b" : "3.0.3"
+}
+var PARAMS = {
+ package : PACKAGE,
+ distTags : DIST_TAGS,
+ auth : AUTH
+}
+
+test("distTags.set call contract", function (t) {
+ t.throws(function () {
+ client.distTags.set(undefined, AUTH, nop)
+ }, "requires a URI")
+
+ t.throws(function () {
+ client.distTags.set([], PARAMS, nop)
+ }, "requires URI to be a string")
+
+ t.throws(function () {
+ client.distTags.set(BASE_URL, undefined, nop)
+ }, "requires params object")
+
+ t.throws(function () {
+ client.distTags.set(BASE_URL, "", nop)
+ }, "params must be object")
+
+ t.throws(function () {
+ client.distTags.set(BASE_URL, PARAMS, undefined)
+ }, "requires callback")
+
+ t.throws(function () {
+ client.distTags.set(BASE_URL, PARAMS, "callback")
+ }, "callback must be function")
+
+ t.throws(
+ function () {
+ var params = {
+ distTags : DIST_TAGS,
+ auth : AUTH
+ }
+ client.distTags.set(BASE_URL, params, nop)
+ },
+ {
+ name : "AssertionError",
+ message : "must pass package name to distTags.set"
+ },
+ "distTags.set must include package name"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ package : PACKAGE,
+ auth : AUTH
+ }
+ client.distTags.set(BASE_URL, params, nop)
+ },
+ {
+ name : "AssertionError",
+ message : "must pass distTags map to distTags.set"
+ },
+ "distTags.set must include dist-tags"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ package : PACKAGE,
+ distTags : DIST_TAGS
+ }
+ client.distTags.set(BASE_URL, params, nop)
+ },
+ { name : "AssertionError", message : "must pass auth to distTags.set" },
+ "distTags.set must include auth"
+ )
+
+ t.end()
+})
+
+test("set dist-tags for a package", function (t) {
+ server.expect("PUT", URI, function (req, res) {
+ t.equal(req.method, "PUT")
+
+ var b = ""
+ req.setEncoding("utf8")
+ req.on("data", function (d) {
+ b += d
+ })
+
+ req.on("end", function () {
+ var d = JSON.parse(b)
+ t.deepEqual(d, DIST_TAGS, "got back tags")
+
+ res.statusCode = 200
+ res.json(DIST_TAGS)
+ })
+ })
+
+ client.distTags.set(BASE_URL, PARAMS, function (error, data) {
+ t.ifError(error, "no errors")
+ t.ok(data.a && data.b, "dist-tags set")
+
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/npm-registry-client/test/dist-tags-update.js b/deps/npm/node_modules/npm-registry-client/test/dist-tags-update.js
new file mode 100644
index 0000000000..7c29e1114d
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/dist-tags-update.js
@@ -0,0 +1,121 @@
+var test = require("tap").test
+
+var server = require("./lib/server.js")
+var common = require("./lib/common.js")
+var client = common.freshClient()
+
+function nop() {}
+
+var BASE_URL = "http://localhost:1337/"
+var URI = "/-/package/underscore/dist-tags"
+var TOKEN = "foo"
+var AUTH = {
+ token : TOKEN
+}
+var PACKAGE = "underscore"
+var DIST_TAGS = {
+ "a" : "8.0.8",
+ "b" : "3.0.3"
+}
+var PARAMS = {
+ package : PACKAGE,
+ distTags : DIST_TAGS,
+ auth : AUTH
+}
+
+test("distTags.update call contract", function (t) {
+ t.throws(function () {
+ client.distTags.update(undefined, AUTH, nop)
+ }, "requires a URI")
+
+ t.throws(function () {
+ client.distTags.update([], PARAMS, nop)
+ }, "requires URI to be a string")
+
+ t.throws(function () {
+ client.distTags.update(BASE_URL, undefined, nop)
+ }, "requires params object")
+
+ t.throws(function () {
+ client.distTags.update(BASE_URL, "", nop)
+ }, "params must be object")
+
+ t.throws(function () {
+ client.distTags.update(BASE_URL, PARAMS, undefined)
+ }, "requires callback")
+
+ t.throws(function () {
+ client.distTags.update(BASE_URL, PARAMS, "callback")
+ }, "callback must be function")
+
+ t.throws(
+ function () {
+ var params = {
+ distTags : DIST_TAGS,
+ auth : AUTH
+ }
+ client.distTags.update(BASE_URL, params, nop)
+ },
+ {
+ name : "AssertionError",
+ message : "must pass package name to distTags.update"
+ },
+ "distTags.update must include package name"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ package : PACKAGE,
+ auth : AUTH
+ }
+ client.distTags.update(BASE_URL, params, nop)
+ },
+ {
+ name : "AssertionError",
+ message : "must pass distTags map to distTags.update"
+ },
+ "distTags.update must include dist-tags"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ package : PACKAGE,
+ distTags : DIST_TAGS
+ }
+ client.distTags.update(BASE_URL, params, nop)
+ },
+ { name : "AssertionError", message : "must pass auth to distTags.update" },
+ "distTags.update must include auth"
+ )
+
+ t.end()
+})
+
+test("update dist-tags for a package", function (t) {
+ server.expect("POST", URI, function (req, res) {
+ t.equal(req.method, "POST")
+
+ var b = ""
+ req.setEncoding("utf8")
+ req.on("data", function (d) {
+ b += d
+ })
+
+ req.on("end", function () {
+ var d = JSON.parse(b)
+ t.deepEqual(d, DIST_TAGS, "got back tags")
+
+ res.statusCode = 200
+ res.json(DIST_TAGS)
+ })
+ })
+
+ client.distTags.update(BASE_URL, PARAMS, function (error, data) {
+ t.ifError(error, "no errors")
+ t.ok(data.a && data.b, "dist-tags set")
+
+ t.end()
+ })
+})
diff --git a/deps/npm/node_modules/npm-registry-client/test/initialize.js b/deps/npm/node_modules/npm-registry-client/test/initialize.js
new file mode 100644
index 0000000000..980a9a7d9d
--- /dev/null
+++ b/deps/npm/node_modules/npm-registry-client/test/initialize.js
@@ -0,0 +1,74 @@
+var test = require("tap").test
+
+// var server = require("./lib/server.js")
+var Client = require("../")
+
+test("defaulted initialization", function (t) {
+ var client = new Client()
+ var options = client.initialize(
+ "http://localhost:1337/",
+ "GET",
+ "application/json",
+ {}
+ )
+
+ t.equal(options.url, "http://localhost:1337/", "URLs match")
+ t.equal(options.method, "GET", "methods match")
+ t.equal(options.proxy, undefined, "proxy won't overwrite environment")
+ t.equal(options.localAddress, undefined, "localAddress has no default value")
+ t.equal(options.strictSSL, true, "SSL is strict by default")
+
+ t.equal(options.headers.accept, "application/json", "accept header set")
+ t.equal(
+ options.headers.version,
+ require("../package.json").version,
+ "npm-registry-client version is present in headers"
+ )
+ t.ok(options.headers["npm-session"], "request ID generated")
+ t.ok(options.headers["user-agent"], "user-agent preset")
+
+ var HttpAgent = require("http").Agent
+ t.ok(options.agent instanceof HttpAgent, "got an HTTP agent for an HTTP URL")
+
+ t.end()
+})
+
+test("referer set on client", function (t) {
+ var client = new Client()
+ client.refer = "xtestx"
+ var options = client.initialize(
+ "http://localhost:1337/",
+ "GET",
+ "application/json",
+ {}
+ )
+
+ t.equal(options.headers.referer, "xtestx", "referer header set")
+
+ t.end()
+})
+
+test("initializing with proxy explicitly disabled", function (t) {
+ var client = new Client({ proxy : { http : false }})
+ var options = client.initialize(
+ "http://localhost:1337/",
+ "GET",
+ "application/json",
+ {}
+ )
+ t.ok("proxy" in options, "proxy overridden by explicitly setting to false")
+ t.equal(options.proxy, null, "request will override proxy when empty proxy passed in")
+ t.end()
+})
+
+test("initializing with proxy undefined", function (t) {
+ var client = new Client({ proxy : { http : undefined }})
+ var options = client.initialize(
+ "http://localhost:1337/",
+ "GET",
+ "application/json",
+ {}
+ )
+ t.notOk("proxy" in options, "proxy can be read from env.PROXY by request")
+ t.end()
+})
diff --git a/deps/npm/node_modules/npm-registry-client/test/publish-again-scoped.js b/deps/npm/node_modules/npm-registry-client/test/publish-again-scoped.js
index 10b1275053..b9d9a24d66 100644
--- a/deps/npm/node_modules/npm-registry-client/test/publish-again-scoped.js
+++ b/deps/npm/node_modules/npm-registry-client/test/publish-again-scoped.js
@@ -78,6 +78,7 @@ tap.test("publish again", function (t) {
var params = {
metadata : pkg,
+ access : "restricted",
body : tarball,
auth : auth
}
diff --git a/deps/npm/node_modules/npm-registry-client/test/publish-again.js b/deps/npm/node_modules/npm-registry-client/test/publish-again.js
index 9c547ca010..f5da5b2435 100644
--- a/deps/npm/node_modules/npm-registry-client/test/publish-again.js
+++ b/deps/npm/node_modules/npm-registry-client/test/publish-again.js
@@ -76,6 +76,7 @@ tap.test("publish again", function (t) {
var params = {
metadata : pkg,
+ access : "public",
body : tarball,
auth : auth
}
diff --git a/deps/npm/node_modules/npm-registry-client/test/publish-failed-no-message.js b/deps/npm/node_modules/npm-registry-client/test/publish-failed-no-message.js
index cce6fcbc7d..50b3f93493 100644
--- a/deps/npm/node_modules/npm-registry-client/test/publish-failed-no-message.js
+++ b/deps/npm/node_modules/npm-registry-client/test/publish-failed-no-message.js
@@ -12,6 +12,7 @@ var USERNAME = "username"
var PASSWORD = "%1234@asdf%"
var EMAIL = "i@izs.me"
var METADATA = require("../package.json")
+var ACCESS = "public"
// not really a tarball, but doesn't matter
var BODY_PATH = require.resolve("../package.json")
var BODY = createReadStream(BODY_PATH, "base64")
@@ -22,6 +23,7 @@ var AUTH = {
}
var PARAMS = {
metadata : METADATA,
+ access : ACCESS,
body : BODY,
auth : AUTH
}
diff --git a/deps/npm/node_modules/npm-registry-client/test/publish-scoped-auth-token.js b/deps/npm/node_modules/npm-registry-client/test/publish-scoped-auth-token.js
index 70ff1e93f1..203c800048 100644
--- a/deps/npm/node_modules/npm-registry-client/test/publish-scoped-auth-token.js
+++ b/deps/npm/node_modules/npm-registry-client/test/publish-scoped-auth-token.js
@@ -44,6 +44,7 @@ tap.test("publish", function (t) {
var params = {
metadata : pkg,
+ access : "restricted",
body : tarball,
auth : auth
}
diff --git a/deps/npm/node_modules/npm-registry-client/test/publish-scoped.js b/deps/npm/node_modules/npm-registry-client/test/publish-scoped.js
index b21e33f417..6bb48617df 100644
--- a/deps/npm/node_modules/npm-registry-client/test/publish-scoped.js
+++ b/deps/npm/node_modules/npm-registry-client/test/publish-scoped.js
@@ -51,6 +51,7 @@ tap.test("publish", function (t) {
var params = {
metadata : pkg,
+ access : "restricted",
body : tarball,
auth : auth
}
diff --git a/deps/npm/node_modules/npm-registry-client/test/publish.js b/deps/npm/node_modules/npm-registry-client/test/publish.js
index 9292a94c7a..5a87b64c09 100644
--- a/deps/npm/node_modules/npm-registry-client/test/publish.js
+++ b/deps/npm/node_modules/npm-registry-client/test/publish.js
@@ -13,6 +13,7 @@ var USERNAME = "username"
var PASSWORD = "%1234@asdf%"
var EMAIL = "i@izs.me"
var METADATA = require("../package.json")
+var ACCESS = "public"
// not really a tarball, but doesn't matter
var BODY_PATH = require.resolve("../package.json")
var BODY = fs.createReadStream(BODY_PATH, "base64")
@@ -23,6 +24,7 @@ var AUTH = {
}
var PARAMS = {
metadata : METADATA,
+ access : ACCESS,
body : BODY,
auth : AUTH
}
@@ -55,6 +57,7 @@ test("publish call contract", function (t) {
t.throws(
function () {
var params = {
+ access : ACCESS,
body : BODY,
auth : AUTH
}
@@ -68,6 +71,7 @@ test("publish call contract", function (t) {
function () {
var params = {
metadata : METADATA,
+ access : ACCESS,
auth : AUTH
}
client.publish(URI, params, nop)
@@ -80,6 +84,7 @@ test("publish call contract", function (t) {
function () {
var params = {
metadata : METADATA,
+ access : ACCESS,
body : BODY
}
client.publish(URI, params, nop)
@@ -92,6 +97,7 @@ test("publish call contract", function (t) {
function () {
var params = {
metadata : -1,
+ access : ACCESS,
body : BODY,
auth : AUTH
}
@@ -105,6 +111,24 @@ test("publish call contract", function (t) {
function () {
var params = {
metadata : METADATA,
+ access : "hamchunx",
+ body : BODY,
+ auth : AUTH
+ }
+ client.publish(URI, params, nop)
+ },
+ {
+ name : "AssertionError",
+ message : "if present, access level must be either 'public' or 'restricted'"
+ },
+ "access level must be 'public' or 'restricted'"
+ )
+
+ t.throws(
+ function () {
+ var params = {
+ metadata : METADATA,
+ access : ACCESS,
body : -1,
auth : AUTH
}
@@ -122,6 +146,7 @@ test("publish call contract", function (t) {
metadata.version = "%!@#$"
var params = {
metadata : metadata,
+ access : ACCESS,
message : BODY,
auth : AUTH
}
@@ -153,6 +178,7 @@ test("publish", function (t) {
var o = JSON.parse(b)
t.equal(o._id, "npm-registry-client")
t.equal(o["dist-tags"].latest, METADATA.version)
+ t.equal(o.access, ACCESS)
t.has(o.versions[METADATA.version], METADATA)
t.same(o.maintainers, [{ name : "username", email : "i@izs.me" }])
t.same(o.maintainers, o.versions[METADATA.version].maintainers)
diff --git a/deps/npm/node_modules/npm-registry-client/test/tag.js b/deps/npm/node_modules/npm-registry-client/test/tag.js
index 687df5d7d5..4116586ee3 100644
--- a/deps/npm/node_modules/npm-registry-client/test/tag.js
+++ b/deps/npm/node_modules/npm-registry-client/test/tag.js
@@ -57,7 +57,7 @@ test("tag call contract", function (t) {
client.tag(URI, params, nop)
},
{ name : "AssertionError", message : "must pass version to tag" },
- "auth must include username"
+ "tag must include version"
)
t.throws(
@@ -69,7 +69,7 @@ test("tag call contract", function (t) {
client.tag(URI, params, nop)
},
{ name : "AssertionError", message : "must pass tag name to tag" },
- "auth must include username"
+ "tag must include name"
)
t.throws(
@@ -81,7 +81,7 @@ test("tag call contract", function (t) {
client.tag(URI, params, nop)
},
{ name : "AssertionError", message : "must pass auth to tag" },
- "auth must include username"
+ "params must include auth"
)
t.end()
diff --git a/deps/npm/node_modules/npm-registry-client/test/whoami.js b/deps/npm/node_modules/npm-registry-client/test/whoami.js
index ccb173a09c..21b70e82fa 100644
--- a/deps/npm/node_modules/npm-registry-client/test/whoami.js
+++ b/deps/npm/node_modules/npm-registry-client/test/whoami.js
@@ -49,10 +49,13 @@ test("whoami call contract", function (t) {
})
test("whoami", function (t) {
- server.expect("GET", "/whoami", function (req, res) {
+ server.expect("GET", "/-/whoami", function (req, res) {
t.equal(req.method, "GET")
// only available for token-based auth for now
- t.equal(req.headers.authorization, "Bearer not-bad-meaning-bad-but-bad-meaning-wombat")
+ t.equal(
+ req.headers.authorization,
+ "Bearer not-bad-meaning-bad-but-bad-meaning-wombat"
+ )
res.json({username : WHOIAM})
})
diff --git a/deps/npm/node_modules/request/.npmignore b/deps/npm/node_modules/request/.npmignore
index 80e59ef525..53fc9efa99 100644
--- a/deps/npm/node_modules/request/.npmignore
+++ b/deps/npm/node_modules/request/.npmignore
@@ -1,2 +1,3 @@
+coverage
tests
node_modules
diff --git a/deps/npm/node_modules/request/.travis.yml b/deps/npm/node_modules/request/.travis.yml
index 90e06c13e3..0988483f3b 100644
--- a/deps/npm/node_modules/request/.travis.yml
+++ b/deps/npm/node_modules/request/.travis.yml
@@ -9,3 +9,4 @@ webhooks:
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false
+sudo: false
diff --git a/deps/npm/node_modules/request/CHANGELOG.md b/deps/npm/node_modules/request/CHANGELOG.md
index f4e5431b42..cfaf173848 100644
--- a/deps/npm/node_modules/request/CHANGELOG.md
+++ b/deps/npm/node_modules/request/CHANGELOG.md
@@ -1,5 +1,41 @@
## Change Log
+### 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)
+
+### v2.52.0 (2015/02/02)
+- [#1383](https://github.com/request/request/pull/1383) Add missing HTTPS options that were not being passed to tunnel (@brichard19) (@nylen, @brichard19)
+- [#1388](https://github.com/request/request/pull/1388) Upgrade mime-types package version (@roderickhsiao)
+- [#1389](https://github.com/request/request/pull/1389) Revise Setup Tunnel Function (@seanstrom)
+- [#1374](https://github.com/request/request/pull/1374) Allow explicitly disabling tunneling for proxied https destinations (@nylen)
+- [#1376](https://github.com/request/request/pull/1376) Use karma-browserify for tests. Add browser test coverage reporter. (@eiriksm)
+- [#1366](https://github.com/request/request/pull/1366) Refactor OAuth into separate module (@simov)
+- [#1373](https://github.com/request/request/pull/1373) Rewrite tunnel test to be pure Node.js (@nylen)
+- [#1371](https://github.com/request/request/pull/1371) Upgrade test reporter (@nylen)
+- [#1360](https://github.com/request/request/pull/1360) Refactor basic, bearer, digest auth logic into separate class (@simov)
+- [#1354](https://github.com/request/request/pull/1354) Remove circular dependency from debugging code (@nylen)
+- [#1351](https://github.com/request/request/pull/1351) Move digest auth into private prototype method (@simov)
+- [#1352](https://github.com/request/request/pull/1352) Update hawk dependency to ~2.3.0 (@mridgway)
+- [#1353](https://github.com/request/request/pull/1353) Correct travis-ci badge (@dogancelik)
+- [#1349](https://github.com/request/request/pull/1349) Make sure we return on errored browser requests. (@eiriksm)
+- [#1346](https://github.com/request/request/pull/1346) getProxyFromURI Extraction Refactor (@seanstrom)
+- [#1337](https://github.com/request/request/pull/1337) Standardize test ports on 6767 (@nylen)
+- [#1341](https://github.com/request/request/pull/1341) Emit FormData error events as Request error events (@nylen, @rwky)
+- [#1343](https://github.com/request/request/pull/1343) Clean up readme badges, and add Travis and Coveralls badges (@nylen)
+- [#1345](https://github.com/request/request/pull/1345) Update README.md (@Aaron-Hartwig)
+- [#1338](https://github.com/request/request/pull/1338) Always wait for server.close() callback in tests (@nylen)
+- [#1342](https://github.com/request/request/pull/1342) Add mock https server and redo start of browser tests for this purpose. (@eiriksm)
+- [#1339](https://github.com/request/request/pull/1339) Improve auth docs (@nylen)
+- [#1335](https://github.com/request/request/pull/1335) Add support for OAuth plaintext signature method (@simov)
+- [#1332](https://github.com/request/request/pull/1332) Add clean script to remove test-browser.js after the tests run (@seanstrom)
+- [#1327](https://github.com/request/request/pull/1327) Fix errors generating coverage reports. (@nylen)
+- [#1330](https://github.com/request/request/pull/1330) Return empty buffer upon empty response body and encoding is set to null (@seanstrom)
+- [#1326](https://github.com/request/request/pull/1326) Use faster container-based infrastructure on Travis (@nylen)
+- [#1315](https://github.com/request/request/pull/1315) Implement rfc3986 option (@simov)
+- [#1314](https://github.com/request/request/pull/1314) Detect urlencoded form data header via regex (@simov)
+- [#1317](https://github.com/request/request/pull/1317) Improve OAuth1.0 server side flow example (@simov)
+
### v2.51.0 (2014/12/10)
- [#1310](https://github.com/request/request/pull/1310) Revert changes introduced in https://github.com/request/request/pull/1282 (@simov)
@@ -155,7 +191,7 @@
- [#987](https://github.com/request/request/pull/987) Show optional modules as being loaded by the module that reqeusted them (@iarna)
### v2.39.0 (2014/07/24)
-- [#976](https://github.com/request/request/pull/976) Update README.md (@fosco-maestro)
+- [#976](https://github.com/request/request/pull/976) Update README.md (@pvoznenko)
### v2.38.0 (2014/07/22)
- [#952](https://github.com/request/request/pull/952) Adding support to client certificate with proxy use case (@ofirshaked)
diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md
index 59d62c2c1a..8b668f99f7 100644
--- a/deps/npm/node_modules/request/README.md
+++ b/deps/npm/node_modules/request/README.md
@@ -1,7 +1,9 @@
# Request — Simplified HTTP client
-[![NPM](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/)
+[![npm package](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/)
-[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/request/request?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+[![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)
## Super simple to use
@@ -11,7 +13,7 @@ Request is designed to be the simplest way possible to make http calls. It suppo
var request = require('request');
request('http://www.google.com', function (error, response, body) {
if (!error && response.statusCode == 200) {
- console.log(body) // Print the google web page.
+ console.log(body) // Show the HTML for the Google homepage.
}
})
```
@@ -155,6 +157,10 @@ 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.
@@ -352,12 +358,25 @@ request.get('http://some.server.com/', {
});
```
-If passed as an option, `auth` should be a hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.
+If passed as an option, `auth` should be a hash containing values:
+
+- `user` || `username`
+- `pass` || `password`
+- `sendImmediately` (optional)
+- `bearer` (optional)
-`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).
+The method form takes parameters
+`auth(username, password, sendImmediately, bearer)`.
-Note that you can also use for basic authentication a trick using the URL itself, as specified in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt).
-Simply pass the `user:password` before the host with an `@` sign.
+`sendImmediately` defaults to `true`, which causes a basic or bearer
+authentication header to be sent. If `sendImmediately` is `false`, then
+`request` will retry with a proper authentication header after receiving a
+`401` response from the server (which must contain a `WWW-Authenticate` header
+indicating the required authentication method).
+
+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
var username = 'username',
@@ -369,9 +388,15 @@ request({url: url}, function (error, response, body) {
});
```
-Digest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.
+Digest authentication is supported, but it only works with `sendImmediately`
+set to `false`; otherwise `request` will send basic authentication on the
+initial request, which will probably cause the request to fail.
-Bearer authentication is supported, and is activated when the `bearer` value is available. The value may be either a `String` or a `Function` returning a `String`. Using a function to supply the bearer token is particularly useful if used in conjuction with `defaults` to allow a single function to supply the last known token at the time or sending a request or to compute one on the fly.
+Bearer authentication is supported, and is activated when the `bearer` value is
+available. The value may be either a `String` or a `Function` returning a
+`String`. Using a function to supply the bearer token is particularly useful if
+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.
## OAuth Signing
@@ -380,7 +405,8 @@ default signing algorithm is
[HMAC-SHA1](https://tools.ietf.org/html/rfc5849#section-3.4.2):
```javascript
-// Twitter OAuth
+// OAuth1.0 - 3-legged server side flow (Twitter example)
+// step 1
var qs = require('querystring')
, oauth =
{ callback: 'http://mysite.com/callback/'
@@ -394,30 +420,40 @@ request.post({url:url, oauth:oauth}, function (e, r, body) {
// and construct a URL that a user clicks on (like a sign in button).
// The verifier is only available in the response after a user has
// verified with twitter that they are authorizing your app.
- var access_token = qs.parse(body)
+
+ // step 2
+ var req_data = qs.parse(body)
+ var uri = 'https://api.twitter.com/oauth/authenticate'
+ + '?' + qs.stringify({oauth_token: req_data.oauth_token})
+ // redirect the user to the authorize uri
+
+ // step 3
+ // after the user is redirected back to your server
+ var auth_data = qs.parse(body)
, oauth =
{ consumer_key: CONSUMER_KEY
, consumer_secret: CONSUMER_SECRET
- , token: access_token.oauth_token
- , verifier: access_token.oauth_verifier
+ , token: auth_data.oauth_token
+ , token_secret: req_data.oauth_token_secret
+ , verifier: auth_data.oauth_verifier
}
, url = 'https://api.twitter.com/oauth/access_token'
;
request.post({url:url, oauth:oauth}, function (e, r, body) {
- var perm_token = qs.parse(body)
+ // ready to make signed requests on behalf of the user
+ var perm_data = qs.parse(body)
, oauth =
{ consumer_key: CONSUMER_KEY
, consumer_secret: CONSUMER_SECRET
- , token: perm_token.oauth_token
- , token_secret: perm_token.oauth_token_secret
+ , token: perm_data.oauth_token
+ , token_secret: perm_data.oauth_token_secret
}
- , url = 'https://api.twitter.com/1.1/users/show.json?'
- , params =
- { screen_name: perm_token.screen_name
- , user_id: perm_token.user_id
+ , url = 'https://api.twitter.com/1.1/users/show.json'
+ , qs =
+ { screen_name: perm_data.screen_name
+ , user_id: perm_data.user_id
}
;
- url += qs.stringify(params)
request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {
console.log(user)
})
@@ -431,6 +467,17 @@ the following changes to the OAuth options object:
* Instead of `consumer_secret`, specify a `private_key` string in
[PEM format](http://how2ssl.com/articles/working_with_pem_files/)
+For [PLAINTEXT signing](http://oauth.net/core/1.0/#anchor22), make
+the following changes to the OAuth options object:
+* Pass `signature_method : 'PLAINTEXT'`
+
+To send OAuth parameters via query params or in a post body as described in The
+[Consumer Request Parameters](http://oauth.net/core/1.0/#consumer_req_param)
+section of the oauth1 spec:
+* Pass `transport_method : 'query'` or `transport_method : 'body'` in the OAuth
+ options object.
+* `transport_method` defaults to `'header'`
+
## Custom HTTP Headers
HTTP Headers, such as `User-Agent`, can be set in the `options` object.
@@ -534,8 +581,7 @@ The first argument can be either a `url` or an `options` object. The only requir
* 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)
- (the default is `chunked: true`). In non-chunked requests, data items with
- body streams are not allowed.
+ 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.
@@ -552,7 +598,10 @@ The first argument can be either a `url` or an `options` object. The only requir
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 request to respond before aborting the request
+* `timeout` - Integer containing the number of milliseconds to wait for a
+ request to respond before aborting the request. 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).
@@ -564,10 +613,14 @@ The first argument can be either a `url` or an `options` object. The only requir
* `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` - If `true`, then *always* use a tunneling proxy. If
- `false` (default), then tunneling will only be used if the
- destination is `https`, or if a previous request in the redirect
- chain used a tunneling proxy.
+* `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
+ request in the redirect chain used a tunneling proxy, `false` otherwise
+ * `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
tunneling proxy.
* `proxyHeaderExclusiveList` - A whitelist of headers to send
@@ -635,7 +688,7 @@ request.post(url)
### request.head
-Same as request() but defaults to `method: "HEAD"`.
+Same as `request()`, but defaults to `method: "HEAD"`.
```javascript
request.head(url)
diff --git a/deps/npm/node_modules/request/index.js b/deps/npm/node_modules/request/index.js
index 99b8386b59..3581b83b46 100755
--- a/deps/npm/node_modules/request/index.js
+++ b/deps/npm/node_modules/request/index.js
@@ -172,5 +172,15 @@ request.forever = function (agentOptions, optionsArg) {
module.exports = request
request.Request = require('./request')
-request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG)
request.initParams = initParams
+
+// Backwards compatibility for request.debug
+Object.defineProperty(request, 'debug', {
+ enumerable : true,
+ get : function() {
+ return request.Request.debug
+ },
+ set : function(debug) {
+ request.Request.debug = debug
+ }
+})
diff --git a/deps/npm/node_modules/request/lib/auth.js b/deps/npm/node_modules/request/lib/auth.js
new file mode 100644
index 0000000000..abe6274536
--- /dev/null
+++ b/deps/npm/node_modules/request/lib/auth.js
@@ -0,0 +1,133 @@
+'use strict'
+
+var caseless = require('caseless')
+ , uuid = require('node-uuid')
+ , helpers = require('./helpers')
+
+var md5 = helpers.md5
+ , toBase64 = helpers.toBase64
+
+
+function Auth () {
+ // define all public properties here
+ this.hasAuth = false
+ this.sentAuth = false
+ this.bearerToken = null
+ this.user = null
+ this.pass = null
+}
+
+Auth.prototype.basic = function (user, pass, sendImmediately) {
+ var self = this
+ if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) {
+ throw new Error('auth() received invalid user or password')
+ }
+ self.user = user
+ self.pass = pass
+ self.hasAuth = true
+ var header = typeof pass !== 'undefined' ? user + ':' + pass : user
+ if (sendImmediately || typeof sendImmediately === 'undefined') {
+ var authHeader = 'Basic ' + toBase64(header)
+ self.sentAuth = true
+ return authHeader
+ }
+}
+
+Auth.prototype.bearer = function (bearer, sendImmediately) {
+ var self = this
+ self.bearerToken = bearer
+ self.hasAuth = true
+ if (sendImmediately || typeof sendImmediately === 'undefined') {
+ if (typeof bearer === 'function') {
+ bearer = bearer()
+ }
+ var authHeader = 'Bearer ' + bearer
+ self.sentAuth = true
+ return authHeader
+ }
+}
+
+Auth.prototype.digest = function (method, path, authHeader) {
+ // TODO: More complete implementation of RFC 2617.
+ // - check challenge.algorithm
+ // - support algorithm="MD5-sess"
+ // - handle challenge.domain
+ // - support qop="auth-int" only
+ // - handle Authentication-Info (not necessarily?)
+ // - check challenge.stale (not necessarily?)
+ // - increase nc (not necessarily?)
+ // For reference:
+ // http://tools.ietf.org/html/rfc2617#section-3
+ // https://github.com/bagder/curl/blob/master/lib/http_digest.c
+
+ var self = this
+
+ var challenge = {}
+ var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi
+ for (;;) {
+ var match = re.exec(authHeader)
+ if (!match) {
+ break
+ }
+ challenge[match[1]] = match[2] || match[3]
+ }
+
+ var ha1 = md5(self.user + ':' + challenge.realm + ':' + self.pass)
+ var ha2 = md5(method + ':' + path)
+ var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth'
+ var nc = qop && '00000001'
+ var cnonce = qop && uuid().replace(/-/g, '')
+ var digestResponse = qop
+ ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2)
+ : md5(ha1 + ':' + challenge.nonce + ':' + ha2)
+ var authValues = {
+ username: self.user,
+ realm: challenge.realm,
+ nonce: challenge.nonce,
+ uri: path,
+ qop: qop,
+ response: digestResponse,
+ nc: nc,
+ cnonce: cnonce,
+ algorithm: challenge.algorithm,
+ opaque: challenge.opaque
+ }
+
+ authHeader = []
+ for (var k in authValues) {
+ if (authValues[k]) {
+ if (k === 'qop' || k === 'nc' || k === 'algorithm') {
+ authHeader.push(k + '=' + authValues[k])
+ } else {
+ authHeader.push(k + '="' + authValues[k] + '"')
+ }
+ }
+ }
+ authHeader = 'Digest ' + authHeader.join(', ')
+ self.sentAuth = true
+ return authHeader
+}
+
+Auth.prototype.response = function (method, path, headers) {
+ var self = this
+ if (!self.hasAuth || self.sentAuth) { return null }
+
+ var c = caseless(headers)
+
+ var authHeader = c.get('www-authenticate')
+ var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase()
+ // debug('reauth', authVerb)
+
+ switch (authVerb) {
+ case 'basic':
+ return self.basic(self.user, self.pass, true)
+
+ case 'bearer':
+ return self.bearer(self.bearerToken, true)
+
+ case 'digest':
+ return self.digest(method, path, authHeader)
+ }
+}
+
+exports.Auth = Auth
diff --git a/deps/npm/node_modules/request/lib/debug.js b/deps/npm/node_modules/request/lib/debug.js
deleted file mode 100644
index 25e3dedc7e..0000000000
--- a/deps/npm/node_modules/request/lib/debug.js
+++ /dev/null
@@ -1,11 +0,0 @@
-'use strict'
-
-var util = require('util')
- , request = require('../index')
-
-
-module.exports = function debug() {
- if (request.debug) {
- console.error('REQUEST %s', util.format.apply(util, arguments))
- }
-}
diff --git a/deps/npm/node_modules/request/lib/getProxyFromURI.js b/deps/npm/node_modules/request/lib/getProxyFromURI.js
new file mode 100644
index 0000000000..0e54767f54
--- /dev/null
+++ b/deps/npm/node_modules/request/lib/getProxyFromURI.js
@@ -0,0 +1,79 @@
+'use strict'
+
+function formatHostname(hostname) {
+ // canonicalize the hostname, so that 'oogle.com' won't match 'google.com'
+ return hostname.replace(/^\.*/, '.').toLowerCase()
+}
+
+function parseNoProxyZone(zone) {
+ zone = zone.trim().toLowerCase()
+
+ var zoneParts = zone.split(':', 2)
+ , zoneHost = formatHostname(zoneParts[0])
+ , zonePort = zoneParts[1]
+ , hasPort = zone.indexOf(':') > -1
+
+ return {hostname: zoneHost, port: zonePort, hasPort: hasPort}
+}
+
+function uriInNoProxy(uri, noProxy) {
+ var port = uri.port || (uri.protocol === 'https:' ? '443' : '80')
+ , hostname = formatHostname(uri.hostname)
+ , noProxyList = noProxy.split(',')
+
+ // iterate through the noProxyList until it finds a match.
+ return noProxyList.map(parseNoProxyZone).some(function(noProxyZone) {
+ var isMatchedAt = hostname.indexOf(noProxyZone.hostname)
+ , hostnameMatched = (
+ isMatchedAt > -1 &&
+ (isMatchedAt === hostname.length - noProxyZone.hostname.length)
+ )
+
+ if (noProxyZone.hasPort) {
+ return (port === noProxyZone.port) && hostnameMatched
+ }
+
+ return hostnameMatched
+ })
+}
+
+function getProxyFromURI(uri) {
+ // Decide the proper request proxy to use based on the request URI object and the
+ // environmental variables (NO_PROXY, HTTP_PROXY, etc.)
+ // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html)
+
+ var noProxy = process.env.NO_PROXY || process.env.no_proxy || ''
+
+ // if the noProxy is a wildcard then return null
+
+ if (noProxy === '*') {
+ return null
+ }
+
+ // if the noProxy is not empty and the uri is found return null
+
+ if (noProxy !== '' && uriInNoProxy(uri, noProxy)) {
+ return null
+ }
+
+ // Check for HTTP or HTTPS Proxy in environment Else default to null
+
+ if (uri.protocol === 'http:') {
+ return process.env.HTTP_PROXY ||
+ process.env.http_proxy || null
+ }
+
+ if (uri.protocol === 'https:') {
+ return process.env.HTTPS_PROXY ||
+ process.env.https_proxy ||
+ process.env.HTTP_PROXY ||
+ process.env.http_proxy || null
+ }
+
+ // if none of that works, return null
+ // (What uri protocol are you using then?)
+
+ return null
+}
+
+module.exports = getProxyFromURI
diff --git a/deps/npm/node_modules/request/lib/oauth.js b/deps/npm/node_modules/request/lib/oauth.js
new file mode 100644
index 0000000000..3224601ccf
--- /dev/null
+++ b/deps/npm/node_modules/request/lib/oauth.js
@@ -0,0 +1,121 @@
+'use strict'
+
+var querystring = require('querystring')
+ , qs = require('qs')
+ , caseless = require('caseless')
+ , uuid = require('node-uuid')
+ , oauth = require('oauth-sign')
+
+
+exports.buildParams = function (_oauth, uri, method, query, form, qsLib) {
+ var oa = {}
+ for (var i in _oauth) {
+ oa['oauth_' + i] = _oauth[i]
+ }
+ if (!oa.oauth_version) {
+ oa.oauth_version = '1.0'
+ }
+ if (!oa.oauth_timestamp) {
+ oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString()
+ }
+ if (!oa.oauth_nonce) {
+ oa.oauth_nonce = uuid().replace(/-/g, '')
+ }
+ if (!oa.oauth_signature_method) {
+ oa.oauth_signature_method = 'HMAC-SHA1'
+ }
+
+ var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key
+ delete oa.oauth_consumer_secret
+ delete oa.oauth_private_key
+
+ var token_secret = oa.oauth_token_secret
+ delete oa.oauth_token_secret
+
+ var realm = oa.oauth_realm
+ delete oa.oauth_realm
+ delete oa.oauth_transport_method
+
+ var baseurl = uri.protocol + '//' + uri.host + uri.pathname
+ var params = qsLib.parse([].concat(query, form, qsLib.stringify(oa)).join('&'))
+
+ oa.oauth_signature = oauth.sign(
+ oa.oauth_signature_method,
+ method,
+ baseurl,
+ params,
+ consumer_secret_or_private_key,
+ token_secret)
+
+ if (realm) {
+ oa.realm = realm
+ }
+
+ return oa
+}
+
+exports.concatParams = function (oa, sep, wrap) {
+ wrap = wrap || ''
+
+ var params = Object.keys(oa).filter(function (i) {
+ return i !== 'realm' && i !== 'oauth_signature'
+ }).sort()
+
+ if (oa.realm) {
+ params.splice(0, 1, 'realm')
+ }
+ params.push('oauth_signature')
+
+ return params.map(function (i) {
+ return i + '=' + wrap + oauth.rfc3986(oa[i]) + 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
+
+ var form
+ , query
+ , contentType = headers.get('content-type') || ''
+ , formContentType = 'application/x-www-form-urlencoded'
+ , transport = _oauth.transport_method || 'header'
+
+ if (contentType.slice(0, formContentType.length) === formContentType) {
+ contentType = formContentType
+ form = body
+ }
+ if (uri.query) {
+ query = uri.query
+ }
+ if (transport === 'body' && (method !== 'POST' || contentType !== formContentType)) {
+ throw new Error('oauth: transport_method of \'body\' requires \'POST\' ' +
+ 'and content-type \'' + formContentType + '\'')
+ }
+
+ var oa = this.buildParams(_oauth, uri, method, query, form, qsLib)
+
+ var data
+ switch (transport) {
+ case 'header':
+ data = 'OAuth ' + this.concatParams(oa, ',', '"')
+ break
+
+ case 'query':
+ data = (query ? '&' : '?') + this.concatParams(oa, '&')
+ break
+
+ case 'body':
+ data = (form ? form + '&' : '') + this.concatParams(oa, '&')
+ break
+
+ default:
+ throw new Error('oauth: transport_method invalid')
+ }
+
+ return {oauth:data, transport:transport}
+}
diff --git a/deps/npm/node_modules/request/node_modules/bl/README.md b/deps/npm/node_modules/request/node_modules/bl/README.md
index 1753cc40b1..6b7fb6d348 100644
--- a/deps/npm/node_modules/request/node_modules/bl/README.md
+++ b/deps/npm/node_modules/request/node_modules/bl/README.md
@@ -190,6 +190,9 @@ See the <b><code>[Buffer](http://nodejs.org/docs/latest/api/buffer.html)</code><
=======
-## License
+<a name="license"></a>
+## License &amp; copyright
-**bl** is Copyright (c) 2013 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.
+Copyright (c) 2013-2014 bl contributors (listed above).
+
+bl is licensed under the MIT license. 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/bl/bl.js b/deps/npm/node_modules/request/node_modules/bl/bl.js
index d1ea3b5c2e..7a2f99788e 100644
--- a/deps/npm/node_modules/request/node_modules/bl/bl.js
+++ b/deps/npm/node_modules/request/node_modules/bl/bl.js
@@ -1,4 +1,4 @@
-var DuplexStream = require('readable-stream').Duplex
+var DuplexStream = require('readable-stream/duplex')
, util = require('util')
function BufferList (callback) {
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 a5692e03c7..3ffbd6a8ad 100644
--- a/deps/npm/node_modules/request/node_modules/bl/package.json
+++ b/deps/npm/node_modules/request/node_modules/bl/package.json
@@ -1,6 +1,6 @@
{
"name": "bl",
- "version": "0.9.3",
+ "version": "0.9.4",
"description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
"main": "bl.js",
"scripts": {
@@ -33,14 +33,15 @@
"faucet": "~0.0.1",
"brtapsauce": "~0.3.0"
},
- "gitHead": "4987a76bf6bafd7616e62c7023c955e62f3a9461",
+ "gitHead": "e7f90703c5f90ca26f60455ea6ad0b6be4a9feee",
"bugs": {
"url": "https://github.com/rvagg/bl/issues"
},
- "_id": "bl@0.9.3",
- "_shasum": "c41eff3e7cb31bde107c8f10076d274eff7f7d44",
+ "_id": "bl@0.9.4",
+ "_shasum": "4702ddf72fbe0ecd82787c00c113aea1935ad0e7",
"_from": "bl@>=0.9.0 <0.10.0",
- "_npmVersion": "1.4.27",
+ "_npmVersion": "2.1.18",
+ "_nodeVersion": "1.0.3",
"_npmUser": {
"name": "rvagg",
"email": "rod@vagg.org"
@@ -52,10 +53,10 @@
}
],
"dist": {
- "shasum": "c41eff3e7cb31bde107c8f10076d274eff7f7d44",
- "tarball": "http://registry.npmjs.org/bl/-/bl-0.9.3.tgz"
+ "shasum": "4702ddf72fbe0ecd82787c00c113aea1935ad0e7",
+ "tarball": "http://registry.npmjs.org/bl/-/bl-0.9.4.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/bl/-/bl-0.9.3.tgz",
+ "_resolved": "https://registry.npmjs.org/bl/-/bl-0.9.4.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/caseless/index.js b/deps/npm/node_modules/request/node_modules/caseless/index.js
index 607eea22bc..ba711f68db 100644
--- a/deps/npm/node_modules/request/node_modules/caseless/index.js
+++ b/deps/npm/node_modules/request/node_modules/caseless/index.js
@@ -1,5 +1,5 @@
function Caseless (dict) {
- this.dict = dict
+ this.dict = dict || {}
}
Caseless.prototype.set = function (name, value, clobber) {
if (typeof name === 'object') {
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 1efd04a975..39153e6144 100644
--- a/deps/npm/node_modules/request/node_modules/caseless/package.json
+++ b/deps/npm/node_modules/request/node_modules/caseless/package.json
@@ -1,6 +1,6 @@
{
"name": "caseless",
- "version": "0.8.0",
+ "version": "0.9.0",
"description": "Caseless object set/get/has, very useful when working with HTTP headers.",
"main": "index.js",
"scripts": {
@@ -27,27 +27,31 @@
"devDependencies": {
"tape": "^2.10.2"
},
- "gitHead": "1bfbf01d4481c057738a64ba284749222a944176",
+ "gitHead": "5ff0ccebbbf14dad5dc91def1f274887801db3e3",
"homepage": "https://github.com/mikeal/caseless",
- "_id": "caseless@0.8.0",
- "_shasum": "5bca2881d41437f54b2407ebe34888c7b9ad4f7d",
- "_from": "caseless@>=0.8.0 <0.9.0",
- "_npmVersion": "2.0.0",
+ "_id": "caseless@0.9.0",
+ "_shasum": "b7b65ce6bf1413886539cfd533f0b30effa9cf88",
+ "_from": "caseless@>=0.9.0 <0.10.0",
+ "_npmVersion": "1.4.14",
"_npmUser": {
- "name": "mikeal",
- "email": "mikeal.rogers@gmail.com"
+ "name": "nylen",
+ "email": "jnylen@gmail.com"
},
"maintainers": [
{
"name": "mikeal",
"email": "mikeal.rogers@gmail.com"
+ },
+ {
+ "name": "nylen",
+ "email": "jnylen@gmail.com"
}
],
"dist": {
- "shasum": "5bca2881d41437f54b2407ebe34888c7b9ad4f7d",
- "tarball": "http://registry.npmjs.org/caseless/-/caseless-0.8.0.tgz"
+ "shasum": "b7b65ce6bf1413886539cfd533f0b30effa9cf88",
+ "tarball": "http://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/caseless/-/caseless-0.8.0.tgz",
+ "_resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/README.md b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/README.md
deleted file mode 100644
index 99d658b8b3..0000000000
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/README.md
+++ /dev/null
@@ -1,99 +0,0 @@
-# mime-types
-
-[![NPM Version][npm-image]][npm-url]
-[![NPM Downloads][downloads-image]][downloads-url]
-[![Node.js Version][node-version-image]][node-version-url]
-[![Build Status][travis-image]][travis-url]
-[![Test Coverage][coveralls-image]][coveralls-url]
-
-The ultimate javascript content-type utility.
-
-Similar to [node-mime](https://github.com/broofa/node-mime), except:
-
-- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,
- so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
-- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
-- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)
-- No `.define()` functionality
-
-Otherwise, the API is compatible.
-
-## Install
-
-```sh
-$ npm install mime-types
-```
-
-## Adding Types
-
-All mime types are based on [mime-db](https://github.com/jshttp/mime-db),
-so open a PR there if you'd like to add mime types.
-
-## API
-
-```js
-var mime = require('mime-types')
-```
-
-All functions return `false` if input is invalid or not found.
-
-### mime.lookup(path)
-
-Lookup the content-type associated with a file.
-
-```js
-mime.lookup('json') // 'application/json'
-mime.lookup('.md') // 'text/x-markdown'
-mime.lookup('file.html') // 'text/html'
-mime.lookup('folder/file.js') // 'application/javascript'
-
-mime.lookup('cats') // false
-```
-
-### mime.contentType(type)
-
-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'
-```
-
-### mime.extension(type)
-
-Get the default extension for a content-type.
-
-```js
-mime.extension('application/octet-stream') // 'bin'
-```
-
-### mime.charset(type)
-
-Lookup the implied default charset of a content-type.
-
-```js
-mime.charset('text/x-markdown') // 'UTF-8'
-```
-
-### var type = mime.types[extension]
-
-A map of content-types by extension.
-
-### [extensions...] = mime.extensions[type]
-
-A map of extensions by content-type.
-
-## License
-
-[MIT](LICENSE)
-
-[npm-image]: https://img.shields.io/npm/v/mime-types.svg?style=flat
-[npm-url]: https://npmjs.org/package/mime-types
-[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
-[node-version-url]: http://nodejs.org/download/
-[travis-image]: https://img.shields.io/travis/jshttp/mime-types.svg?style=flat
-[travis-url]: https://travis-ci.org/jshttp/mime-types
-[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types.svg?style=flat
-[coveralls-url]: https://coveralls.io/r/jshttp/mime-types
-[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg?style=flat
-[downloads-url]: https://npmjs.org/package/mime-types
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db/LICENSE b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db/LICENSE
deleted file mode 100644
index a7ae8ee9b8..0000000000
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-
-The MIT License (MIT)
-
-Copyright (c) 2014 Jonathan Ong me@jongleberry.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/form-data/node_modules/mime-types/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/package.json
deleted file mode 100644
index 1544629b6b..0000000000
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/package.json
+++ /dev/null
@@ -1,80 +0,0 @@
-{
- "name": "mime-types",
- "description": "The ultimate javascript content-type utility.",
- "version": "2.0.4",
- "contributors": [
- {
- "name": "Jeremiah Senkpiel",
- "email": "fishrock123@rocketmail.com",
- "url": "https://searchbeam.jit.su"
- },
- {
- "name": "Jonathan Ong",
- "email": "me@jongleberry.com",
- "url": "http://jongleberry.com"
- }
- ],
- "license": "MIT",
- "keywords": [
- "mime",
- "types"
- ],
- "repository": {
- "type": "git",
- "url": "https://github.com/jshttp/mime-types"
- },
- "dependencies": {
- "mime-db": "~1.3.0"
- },
- "devDependencies": {
- "istanbul": "0",
- "mocha": "~1.21.5"
- },
- "files": [
- "HISTORY.md",
- "LICENSE",
- "index.js"
- ],
- "engines": {
- "node": ">= 0.6"
- },
- "scripts": {
- "test": "mocha --reporter spec test/test.js",
- "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": "63a9b82e6e364d62428ed5459e5486504c489bf2",
- "bugs": {
- "url": "https://github.com/jshttp/mime-types/issues"
- },
- "homepage": "https://github.com/jshttp/mime-types",
- "_id": "mime-types@2.0.4",
- "_shasum": "855a612979141d806ba5104294a28c731c6ea790",
- "_from": "mime-types@>=2.0.3 <2.1.0",
- "_npmVersion": "1.4.21",
- "_npmUser": {
- "name": "dougwilson",
- "email": "doug@somethingdoug.com"
- },
- "maintainers": [
- {
- "name": "jongleberry",
- "email": "jonathanrichardong@gmail.com"
- },
- {
- "name": "fishrock123",
- "email": "fishrock123@rocketmail.com"
- },
- {
- "name": "dougwilson",
- "email": "doug@somethingdoug.com"
- }
- ],
- "dist": {
- "shasum": "855a612979141d806ba5104294a28c731c6ea790",
- "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.0.4.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.4.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/.npmignore b/deps/npm/node_modules/request/node_modules/hawk/.npmignore
index b3bb517630..70febc05e4 100644
--- a/deps/npm/node_modules/request/node_modules/hawk/.npmignore
+++ b/deps/npm/node_modules/request/node_modules/hawk/.npmignore
@@ -1,18 +1,20 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+components
+build
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
+
diff --git a/deps/npm/node_modules/request/node_modules/hawk/.travis.yml b/deps/npm/node_modules/request/node_modules/hawk/.travis.yml
index 40ca59eeeb..047f7e3d5e 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/.travis.yml
+++ b/deps/npm/node_modules/request/node_modules/hawk/.travis.yml
@@ -1,5 +1,5 @@
-language: node_js
-
-node_js:
- - 0.10
-
+language: node_js
+
+node_js:
+ - 0.10
+
diff --git a/deps/npm/node_modules/request/node_modules/hawk/LICENSE b/deps/npm/node_modules/request/node_modules/hawk/LICENSE
index e699a7bdba..7880936847 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/LICENSE
+++ b/deps/npm/node_modules/request/node_modules/hawk/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2012-2013, Eran Hammer.
+Copyright (c) 2012-2014, Eran Hammer and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -8,17 +8,21 @@ modification, are permitted provided that the following conditions are met:
* 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.
- * Neither the name of Eran Hammer nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
+ * The names of any contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 ERAN HAMMER BE LIABLE FOR ANY
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hueniverse/hawk/graphs/contributors
diff --git a/deps/npm/node_modules/request/node_modules/hawk/Makefile b/deps/npm/node_modules/request/node_modules/hawk/Makefile
index 5f339bf347..b102d5ab80 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/Makefile
+++ b/deps/npm/node_modules/request/node_modules/hawk/Makefile
@@ -1,10 +1,8 @@
test:
- @node node_modules/lab/bin/lab
+ @node node_modules/lab/bin/lab -a code
test-cov:
- @node node_modules/lab/bin/lab -r threshold -t 100
+ @node node_modules/lab/bin/lab -a code -t 100
test-cov-html:
- @node node_modules/lab/bin/lab -r html -o coverage.html
-complexity:
- @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib
+ @node node_modules/lab/bin/lab -a code -r html -o coverage.html
-.PHONY: test test-cov test-cov-html complexity
+.PHONY: test test-cov test-cov-html
diff --git a/deps/npm/node_modules/request/node_modules/hawk/README.md b/deps/npm/node_modules/request/node_modules/hawk/README.md
index 36312f4feb..0bcd287901 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/README.md
+++ b/deps/npm/node_modules/request/node_modules/hawk/README.md
@@ -3,7 +3,10 @@
<img align="right" src="https://raw.github.com/hueniverse/hawk/master/images/logo.png" /> **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial
HTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz).
-Current version: **1.0**
+Current version: **2.3**
+
+Note: 2.x is the same exact protocol as 1.1. The version increment reflects a change in the internal error format
+used by the module and used by the node API.
[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk)
@@ -34,6 +37,7 @@ Current version: **1.0**
<p></p>
- [**Frequently Asked Questions**](#frequently-asked-questions)
<p></p>
+- [**Implementations**](#implementations)
- [**Acknowledgements**](#acknowledgements)
# Introduction
@@ -346,7 +350,7 @@ Server-Authorization: Hawk mac="XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=", h
## Browser Support and Considerations
-A browser script is provided for including using a `<script>` tag in [lib/browser.js](/lib/browser.js).
+A browser script is provided for including using a `<script>` tag in [lib/browser.js](/lib/browser.js). It's also a [component](http://component.io/hueniverse/hawk).
**Hawk** relies on the _Server-Authorization_ and _WWW-Authenticate_ headers in its response to communicate with the client.
Therefore, in case of CORS requests, it is important to consider sending _Access-Control-Expose-Headers_ with the value
@@ -542,7 +546,7 @@ something? Open an issue!
### Is it done?
-At if version 0.10.0, **Hawk** is feature-complete. However, until this module reaches version 1.0.0 it is considered experimental
+As of version 0.10.0, **Hawk** is feature-complete. However, until this module reaches version 1.0.0 it is considered experimental
and is likely to change. This also means your feedback and contribution are very welcome. Feel free to open issues with questions
and suggestions.
@@ -598,7 +602,7 @@ but with the additional security of delegated credentials.
When calculating a hash or MAC, a static prefix (tag) is added. The prefix is used to prevent MAC values from being
used or reused for a purpose other than what they were created for (i.e. prevents switching MAC values between a request,
-response, and a bewit use cases). It also protects against expliots created after a potential change in how the protocol
+response, and a bewit use cases). It also protects against exploits created after a potential change in how the protocol
creates the normalized string. For example, if a future version would switch the order of nonce and timestamp, it
can create an exploit opportunity for cases where the nonce is similar in format to a timestamp.
@@ -614,6 +618,12 @@ at work to produce more garbage.
**Hawk** provides a simple HTTP authentication scheme for making client-server requests. It does not address the OAuth use case
of delegating access to a third party. If you are looking for an OAuth alternative, check out [Oz](https://github.com/hueniverse/oz).
+# Implementations
+
+- [Logibit Hawk in F#/.Net](https://github.com/logibit/logibit.hawk/)
+- [Tent Hawk in Ruby](https://github.com/tent/hawk-ruby)
+- [Wealdtech in Java](https://github.com/wealdtech/hawk)
+- [Kumar's Mohawk in Python](https://github.com/kumar303/mohawk/)
# Acknowledgements
diff --git a/deps/npm/node_modules/request/node_modules/hawk/bower.json b/deps/npm/node_modules/request/node_modules/hawk/bower.json
new file mode 100644
index 0000000000..7d2d120e0d
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/hawk/bower.json
@@ -0,0 +1,24 @@
+{
+ "name": "hawk",
+ "main": "lib/browser.js",
+ "license": "./LICENSE",
+ "ignore": [
+ "!lib",
+ "lib/*",
+ "!lib/browser.js",
+ "index.js"
+ ],
+ "keywords": [
+ "http",
+ "authentication",
+ "scheme",
+ "hawk"
+ ],
+ "authors": [
+ "Eran Hammer <eran@hammer.io>"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/hueniverse/hawk.git"
+ }
+}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/component.json b/deps/npm/node_modules/request/node_modules/hawk/component.json
new file mode 100644
index 0000000000..63e76a2e31
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/hawk/component.json
@@ -0,0 +1,19 @@
+{
+ "name": "hawk",
+ "repo": "hueniverse/hawk",
+ "description": "HTTP Hawk Authentication Scheme",
+ "version": "1.0.0",
+ "keywords": [
+ "http",
+ "authentication",
+ "scheme",
+ "hawk"
+ ],
+ "dependencies": {},
+ "development": {},
+ "license": "BSD",
+ "main": "lib/browser.js",
+ "scripts": [
+ "lib/browser.js"
+ ]
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js b/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js
index 1ff0cd3286..3307fa243a 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js
@@ -1,27 +1,23 @@
/*
HTTP Hawk Authentication Scheme
- Copyright (c) 2012-2013, Eran Hammer <eran@hueniverse.com>
- MIT Licensed
+ Copyright (c) 2012-2014, Eran Hammer <eran@hammer.io>
+ BSD Licensed
*/
// Declare namespace
-var hawk = {};
-
-
-// Export if used as a module
+var hawk = {
+ internals: {}
+};
-if (typeof module !== "undefined" && module.exports) {
- module.exports = hawk;
-}
hawk.client = {
// Generate an Authorization header for a given request
/*
- uri: 'http://example.com/resource?a=b'
+ uri: 'http://example.com/resource?a=b' or object generated by hawk.utils.parseUri()
method: HTTP verb (e.g. 'GET', 'POST')
options: {
@@ -66,7 +62,7 @@ hawk.client = {
// Application time
- var timestamp = options.timestamp || Math.floor((hawk.utils.now() + (options.localtimeOffsetMsec || 0)) / 1000)
+ var timestamp = options.timestamp || hawk.utils.now(options.localtimeOffsetMsec);
// Validate credentials
@@ -76,7 +72,7 @@ hawk.client = {
!credentials.key ||
!credentials.algorithm) {
- result.err = 'Invalid credential object';
+ result.err = 'Invalid credentials object';
return result;
}
@@ -111,7 +107,7 @@ hawk.client = {
// Calculate payload hash
if (!artifacts.hash &&
- options.hasOwnProperty('payload')) {
+ (options.payload || options.payload === '')) {
artifacts.hash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
}
@@ -138,12 +134,90 @@ hawk.client = {
return result;
},
+ // Generate a bewit value for a given URI
+
+ /*
+ uri: 'http://example.com/resource?a=b'
+ options: {
+
+ // Required
+
+ credentials: {
+ id: 'dh37fgj492je',
+ key: 'aoijedoaijsdlaksjdl',
+ algorithm: 'sha256' // 'sha1', 'sha256'
+ },
+ ttlSec: 60 * 60, // TTL in seconds
+
+ // Optional
+
+ ext: 'application-specific', // Application specific data sent via the ext attribute
+ localtimeOffsetMsec: 400 // Time offset to sync with server time
+ };
+ */
+
+ bewit: function (uri, options) {
+
+ // Validate inputs
+
+ if (!uri ||
+ (typeof uri !== 'string') ||
+ !options ||
+ typeof options !== 'object' ||
+ !options.ttlSec) {
+
+ return '';
+ }
+
+ options.ext = (options.ext === null || options.ext === undefined ? '' : options.ext); // Zero is valid value
+
+ // Application time
+
+ var now = hawk.utils.now(options.localtimeOffsetMsec);
+
+ // Validate credentials
+
+ var credentials = options.credentials;
+ if (!credentials ||
+ !credentials.id ||
+ !credentials.key ||
+ !credentials.algorithm) {
+
+ return '';
+ }
+
+ if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) {
+ return '';
+ }
+
+ // Parse URI
+
+ uri = hawk.utils.parseUri(uri);
+
+ // Calculate signature
+
+ var exp = now + options.ttlSec;
+ var mac = hawk.crypto.calculateMac('bewit', credentials, {
+ ts: exp,
+ nonce: '',
+ method: 'GET',
+ resource: uri.relative, // Maintain trailing '?' and query params
+ host: uri.hostname,
+ port: uri.port,
+ ext: options.ext
+ });
+
+ // Construct bewit: id\exp\mac\ext
+
+ var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
+ return hawk.utils.base64urlEncode(bewit);
+ },
// Validate server response
/*
request: object created via 'new XMLHttpRequest()' after response received
- artifacts: object recieved from header().artifacts
+ artifacts: object received from header().artifacts
options: {
payload: optional payload received
required: specifies if a Server-Authorization header is required. Defaults to 'false'
@@ -154,11 +228,17 @@ hawk.client = {
options = options || {};
- if (request.getResponseHeader('www-authenticate')) {
+ var getHeader = function (name) {
+
+ return request.getResponseHeader ? request.getResponseHeader(name) : request.getHeader(name);
+ };
+
+ var wwwAuthenticate = getHeader('www-authenticate');
+ if (wwwAuthenticate) {
// Parse HTTP WWW-Authenticate header
- var attributes = hawk.utils.parseAuthorizationHeader(request.getResponseHeader('www-authenticate'), ['ts', 'tsm', 'error']);
+ var attributes = hawk.utils.parseAuthorizationHeader(wwwAuthenticate, ['ts', 'tsm', 'error']);
if (!attributes) {
return false;
}
@@ -169,19 +249,20 @@ hawk.client = {
return false;
}
- hawk.utils.setNtpOffset(attributes.ts - Math.floor(Date.now() / 1000)); // Keep offset at 1 second precision
+ hawk.utils.setNtpOffset(attributes.ts - Math.floor((new Date()).getTime() / 1000)); // Keep offset at 1 second precision
}
}
// Parse HTTP Server-Authorization header
- if (!request.getResponseHeader('server-authorization') &&
+ var serverAuthorization = getHeader('server-authorization');
+ if (!serverAuthorization &&
!options.required) {
return true;
}
- var attributes = hawk.utils.parseAuthorizationHeader(request.getResponseHeader('server-authorization'), ['mac', 'ext', 'hash']);
+ var attributes = hawk.utils.parseAuthorizationHeader(serverAuthorization, ['mac', 'ext', 'hash']);
if (!attributes) {
return false;
}
@@ -204,7 +285,9 @@ hawk.client = {
return false;
}
- if (!options.hasOwnProperty('payload')) {
+ if (!options.payload &&
+ options.payload !== '') {
+
return true;
}
@@ -212,7 +295,7 @@ hawk.client = {
return false;
}
- var calculatedHash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, request.getResponseHeader('content-type'));
+ var calculatedHash = hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, getHeader('content-type'));
return (calculatedHash === attributes.hash);
},
@@ -230,7 +313,7 @@ hawk.client = {
// Application time
- var timestamp = options.timestamp || Math.floor((hawk.utils.now() + (options.localtimeOffsetMsec || 0)) / 1000)
+ var timestamp = options.timestamp || hawk.utils.now(options.localtimeOffsetMsec);
// Validate credentials
@@ -279,7 +362,7 @@ hawk.client = {
}
if (updateClock !== false) {
- hawk.utils.setNtpOffset(message.ts - Math.floor(Date.now() / 1000)); // Keep offset at 1 second precision
+ hawk.utils.setNtpOffset(message.ts - Math.floor((new Date()).getTime() / 1000)); // Keep offset at 1 second precision
}
return true;
@@ -331,7 +414,7 @@ hawk.crypto = {
var hash = CryptoJS.algo[algorithm.toUpperCase()].create();
hash.update('hawk.' + hawk.crypto.headerVersion + '.payload\n');
hash.update(hawk.utils.parseContentType(contentType) + '\n');
- hash.update(payload || '');
+ hash.update(payload);
hash.update('\n');
return hash.finalize().toString(CryptoJS.enc.Base64);
},
@@ -344,46 +427,80 @@ hawk.crypto = {
};
-hawk.utils = {
+// localStorage compatible interface
- storage: { // localStorage compatible interface
- _cache: {},
- setItem: function (key, value) {
+hawk.internals.LocalStorage = function () {
- hawk.utils.storage._cache[key] = value;
- },
- getItem: function (key) {
+ this._cache = {};
+ this.length = 0;
- return hawk.utils.storage._cache[key];
- }
- },
+ this.getItem = function (key) {
+
+ return this._cache.hasOwnProperty(key) ? String(this._cache[key]) : null;
+ };
+
+ this.setItem = function (key, value) {
+
+ this._cache[key] = String(value);
+ this.length = Object.keys(this._cache).length;
+ };
+
+ this.removeItem = function (key) {
+
+ delete this._cache[key];
+ this.length = Object.keys(this._cache).length;
+ };
+
+ this.clear = function () {
+
+ this._cache = {};
+ this.length = 0;
+ };
+
+ this.key = function (i) {
+
+ return Object.keys(this._cache)[i || 0];
+ };
+};
+
+
+hawk.utils = {
+
+ storage: new hawk.internals.LocalStorage(),
setStorage: function (storage) {
- var ntpOffset = hawk.utils.getNtpOffset() || 0;
+ var ntpOffset = hawk.utils.storage.getItem('hawk_ntp_offset');
hawk.utils.storage = storage;
- hawk.utils.setNtpOffset(ntpOffset);
+ if (ntpOffset) {
+ hawk.utils.setNtpOffset(ntpOffset);
+ }
},
setNtpOffset: function (offset) {
try {
- hawk.utils.storage.setItem('hawk_ntp_offset', offset);
+ hawk.utils.storage.setItem('hawk_ntp_offset', offset);
}
catch (err) {
- console.error('[hawk] could not write to storage.');
- console.error(err);
+ console.error('[hawk] could not write to storage.');
+ console.error(err);
}
},
getNtpOffset: function () {
- return parseInt(hawk.utils.storage.getItem('hawk_ntp_offset') || '0', 10);
+ var offset = hawk.utils.storage.getItem('hawk_ntp_offset');
+ if (!offset) {
+ return 0;
+ }
+
+ return parseInt(offset, 10);
},
- now: function () {
+ now: function (localtimeOffsetMsec) {
- return Date.now() + hawk.utils.getNtpOffset();
+ return Math.floor(((new Date()).getTime() + (localtimeOffsetMsec || 0)) / 1000) + hawk.utils.getNtpOffset();
},
escapeHeaderAttribute: function (attribute) {
@@ -397,7 +514,7 @@ hawk.utils = {
return '';
}
- return header.split(';')[0].trim().toLowerCase();
+ return header.split(';')[0].replace(/^\s+|\s+$/g, '').toLowerCase();
},
parseAuthorizationHeader: function (header, keys) {
@@ -476,32 +593,49 @@ hawk.utils = {
var keys = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'hostname', 'port', 'resource', 'relative', 'pathname', 'directory', 'file', 'query', 'fragment'];
var uriRegex = /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?)(?:#(.*))?)/;
- var uriByNumber = uriRegex.exec(input);
+ var uriByNumber = input.match(uriRegex);
var uri = {};
- var i = 15;
- while (i--) {
+ for (var i = 0, il = keys.length; i < il; ++i) {
uri[keys[i]] = uriByNumber[i] || '';
}
- if (uri.port === null ||
- uri.port === '') {
-
+ if (uri.port === '') {
uri.port = (uri.protocol.toLowerCase() === 'http' ? '80' : (uri.protocol.toLowerCase() === 'https' ? '443' : ''));
}
return uri;
+ },
+
+ base64urlEncode: function (value) {
+
+ var wordArray = CryptoJS.enc.Utf8.parse(value);
+ var encoded = CryptoJS.enc.Base64.stringify(wordArray);
+ return encoded.replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
}
};
+// $lab:coverage:off$
+
// Based on: Crypto-JS v3.1.2
// Copyright (c) 2009-2013, Jeff Mott. All rights reserved.
// http://code.google.com/p/crypto-js/
// http://code.google.com/p/crypto-js/wiki/License
-var CryptoJS=CryptoJS||function(h,r){var k={},l=k.lib={},n=function(){},f=l.Base={extend:function(a){n.prototype=this;var b=new n;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},j=l.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=r?b:4*a.length},toString:function(a){return(a||s).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var e=0;e<a;e++)b[c+e>>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((c+e)%4);else if(65535<d.length)for(e=0;e<a;e+=4)b[c+e>>>2]=d[e>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<<32-8*(b%4);a.length=h.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],d=0;d<a;d+=4)b.push(4294967296*h.random()|0);return new j.init(b,a)}}),m=k.enc={},s=m.Hex={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c<a;c++){var e=b[c>>>2]>>>24-8*(c%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c<b;c+=2)d[c>>>3]|=parseInt(a.substr(c,2),16)<<24-4*(c%8);return new j.init(d,b/2)}},p=m.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c<a;c++)d.push(String.fromCharCode(b[c>>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c<b;c++)d[c>>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new j.init(d,b)}},t=m.Utf8={stringify:function(a){try{return decodeURIComponent(escape(p.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return p.parse(unescape(encodeURIComponent(a)))}},q=l.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new j.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=t.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,d=b.words,c=b.sigBytes,e=this.blockSize,f=c/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;c=h.min(4*a,c);if(a){for(var g=0;g<a;g+=e)this._doProcessBlock(d,g);g=d.splice(0,a);b.sigBytes-=c}return new j.init(g,c)},clone:function(){var a=f.clone.call(this);a._data=this._data.clone();return a},_minBufferSize:0});l.Hasher=q.extend({cfg:f.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){q.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,d){return(new a.init(d)).finalize(b)}},_createHmacHelper:function(a){return function(b,d){return(new u.HMAC.init(a,d)).finalize(b)}}});var u=k.algo={};return k}(Math);
+var CryptoJS = CryptoJS || function (h, r) { var k = {}, l = k.lib = {}, n = function () { }, f = l.Base = { extend: function (a) { n.prototype = this; var b = new n; a && b.mixIn(a); b.hasOwnProperty("init") || (b.init = function () { b.$super.init.apply(this, arguments) }); b.init.prototype = b; b.$super = this; return b }, create: function () { var a = this.extend(); a.init.apply(a, arguments); return a }, init: function () { }, mixIn: function (a) { for (var b in a) a.hasOwnProperty(b) && (this[b] = a[b]); a.hasOwnProperty("toString") && (this.toString = a.toString) }, clone: function () { return this.init.prototype.extend(this) } }, j = l.WordArray = f.extend({ init: function (a, b) { a = this.words = a || []; this.sigBytes = b != r ? b : 4 * a.length }, toString: function (a) { return (a || s).stringify(this) }, concat: function (a) { var b = this.words, d = a.words, c = this.sigBytes; a = a.sigBytes; this.clamp(); if (c % 4) for (var e = 0; e < a; e++) b[c + e >>> 2] |= (d[e >>> 2] >>> 24 - 8 * (e % 4) & 255) << 24 - 8 * ((c + e) % 4); else if (65535 < d.length) for (e = 0; e < a; e += 4) b[c + e >>> 2] = d[e >>> 2]; else b.push.apply(b, d); this.sigBytes += a; return this }, clamp: function () { var a = this.words, b = this.sigBytes; a[b >>> 2] &= 4294967295 << 32 - 8 * (b % 4); a.length = h.ceil(b / 4) }, clone: function () { var a = f.clone.call(this); a.words = this.words.slice(0); return a }, random: function (a) { for (var b = [], d = 0; d < a; d += 4) b.push(4294967296 * h.random() | 0); return new j.init(b, a) } }), m = k.enc = {}, s = m.Hex = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var d = [], c = 0; c < a; c++) { var e = b[c >>> 2] >>> 24 - 8 * (c % 4) & 255; d.push((e >>> 4).toString(16)); d.push((e & 15).toString(16)) } return d.join("") }, parse: function (a) { for (var b = a.length, d = [], c = 0; c < b; c += 2) d[c >>> 3] |= parseInt(a.substr(c, 2), 16) << 24 - 4 * (c % 8); return new j.init(d, b / 2) } }, p = m.Latin1 = { stringify: function (a) { var b = a.words; a = a.sigBytes; for (var d = [], c = 0; c < a; c++) d.push(String.fromCharCode(b[c >>> 2] >>> 24 - 8 * (c % 4) & 255)); return d.join("") }, parse: function (a) { for (var b = a.length, d = [], c = 0; c < b; c++) d[c >>> 2] |= (a.charCodeAt(c) & 255) << 24 - 8 * (c % 4); return new j.init(d, b) } }, t = m.Utf8 = { stringify: function (a) { try { return decodeURIComponent(escape(p.stringify(a))) } catch (b) { throw Error("Malformed UTF-8 data"); } }, parse: function (a) { return p.parse(unescape(encodeURIComponent(a))) } }, q = l.BufferedBlockAlgorithm = f.extend({ reset: function () { this._data = new j.init; this._nDataBytes = 0 }, _append: function (a) { "string" == typeof a && (a = t.parse(a)); this._data.concat(a); this._nDataBytes += a.sigBytes }, _process: function (a) { var b = this._data, d = b.words, c = b.sigBytes, e = this.blockSize, f = c / (4 * e), f = a ? h.ceil(f) : h.max((f | 0) - this._minBufferSize, 0); a = f * e; c = h.min(4 * a, c); if (a) { for (var g = 0; g < a; g += e) this._doProcessBlock(d, g); g = d.splice(0, a); b.sigBytes -= c } return new j.init(g, c) }, clone: function () { var a = f.clone.call(this); a._data = this._data.clone(); return a }, _minBufferSize: 0 }); l.Hasher = q.extend({ cfg: f.extend(), init: function (a) { this.cfg = this.cfg.extend(a); this.reset() }, reset: function () { q.reset.call(this); this._doReset() }, update: function (a) { this._append(a); this._process(); return this }, finalize: function (a) { a && this._append(a); return this._doFinalize() }, blockSize: 16, _createHelper: function (a) { return function (b, d) { return (new a.init(d)).finalize(b) } }, _createHmacHelper: function (a) { return function (b, d) { return (new u.HMAC.init(a, d)).finalize(b) } } }); var u = k.algo = {}; return k }(Math);
(function () { var k = CryptoJS, b = k.lib, m = b.WordArray, l = b.Hasher, d = [], b = k.algo.SHA1 = l.extend({ _doReset: function () { this._hash = new m.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]) }, _doProcessBlock: function (n, p) { for (var a = this._hash.words, e = a[0], f = a[1], h = a[2], j = a[3], b = a[4], c = 0; 80 > c; c++) { if (16 > c) d[c] = n[p + c] | 0; else { var g = d[c - 3] ^ d[c - 8] ^ d[c - 14] ^ d[c - 16]; d[c] = g << 1 | g >>> 31 } g = (e << 5 | e >>> 27) + b + d[c]; g = 20 > c ? g + ((f & h | ~f & j) + 1518500249) : 40 > c ? g + ((f ^ h ^ j) + 1859775393) : 60 > c ? g + ((f & h | f & j | h & j) - 1894007588) : g + ((f ^ h ^ j) - 899497514); b = j; j = h; h = f << 30 | f >>> 2; f = e; e = g } a[0] = a[0] + e | 0; a[1] = a[1] + f | 0; a[2] = a[2] + h | 0; a[3] = a[3] + j | 0; a[4] = a[4] + b | 0 }, _doFinalize: function () { var b = this._data, d = b.words, a = 8 * this._nDataBytes, e = 8 * b.sigBytes; d[e >>> 5] |= 128 << 24 - e % 32; d[(e + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296); d[(e + 64 >>> 9 << 4) + 15] = a; b.sigBytes = 4 * d.length; this._process(); return this._hash }, clone: function () { var b = l.clone.call(this); b._hash = this._hash.clone(); return b } }); k.SHA1 = l._createHelper(b); k.HmacSHA1 = l._createHmacHelper(b) })();
(function (k) { for (var g = CryptoJS, h = g.lib, v = h.WordArray, j = h.Hasher, h = g.algo, s = [], t = [], u = function (q) { return 4294967296 * (q - (q | 0)) | 0 }, l = 2, b = 0; 64 > b;) { var d; a: { d = l; for (var w = k.sqrt(d), r = 2; r <= w; r++) if (!(d % r)) { d = !1; break a } d = !0 } d && (8 > b && (s[b] = u(k.pow(l, 0.5))), t[b] = u(k.pow(l, 1 / 3)), b++); l++ } var n = [], h = h.SHA256 = j.extend({ _doReset: function () { this._hash = new v.init(s.slice(0)) }, _doProcessBlock: function (q, h) { for (var a = this._hash.words, c = a[0], d = a[1], b = a[2], k = a[3], f = a[4], g = a[5], j = a[6], l = a[7], e = 0; 64 > e; e++) { if (16 > e) n[e] = q[h + e] | 0; else { var m = n[e - 15], p = n[e - 2]; n[e] = ((m << 25 | m >>> 7) ^ (m << 14 | m >>> 18) ^ m >>> 3) + n[e - 7] + ((p << 15 | p >>> 17) ^ (p << 13 | p >>> 19) ^ p >>> 10) + n[e - 16] } m = l + ((f << 26 | f >>> 6) ^ (f << 21 | f >>> 11) ^ (f << 7 | f >>> 25)) + (f & g ^ ~f & j) + t[e] + n[e]; p = ((c << 30 | c >>> 2) ^ (c << 19 | c >>> 13) ^ (c << 10 | c >>> 22)) + (c & d ^ c & b ^ d & b); l = j; j = g; g = f; f = k + m | 0; k = b; b = d; d = c; c = m + p | 0 } a[0] = a[0] + c | 0; a[1] = a[1] + d | 0; a[2] = a[2] + b | 0; a[3] = a[3] + k | 0; a[4] = a[4] + f | 0; a[5] = a[5] + g | 0; a[6] = a[6] + j | 0; a[7] = a[7] + l | 0 }, _doFinalize: function () { var d = this._data, b = d.words, a = 8 * this._nDataBytes, c = 8 * d.sigBytes; b[c >>> 5] |= 128 << 24 - c % 32; b[(c + 64 >>> 9 << 4) + 14] = k.floor(a / 4294967296); b[(c + 64 >>> 9 << 4) + 15] = a; d.sigBytes = 4 * b.length; this._process(); return this._hash }, clone: function () { var b = j.clone.call(this); b._hash = this._hash.clone(); return b } }); g.SHA256 = j._createHelper(h); g.HmacSHA256 = j._createHmacHelper(h) })(Math);
-(function(){var c=CryptoJS,k=c.enc.Utf8;c.algo.HMAC=c.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=k.parse(b));var c=a.blockSize,e=4*c;b.sigBytes>e&&(b=a.finalize(b));b.clamp();for(var f=this._oKey=b.clone(),g=this._iKey=b.clone(),h=f.words,j=g.words,d=0;d<c;d++)h[d]^=1549556828,j[d]^=909522486;f.sigBytes=g.sigBytes=e;this.reset()},reset:function(){var a=this._hasher;a.reset();a.update(this._iKey)},update:function(a){this._hasher.update(a);return this},finalize:function(a){var b=this._hasher;a=b.finalize(a);b.reset();return b.finalize(this._oKey.clone().concat(a))}})})();
-(function(){var h=CryptoJS,j=h.lib.WordArray;h.enc.Base64={stringify:function(b){var e=b.words,f=b.sigBytes,c=this._map;b.clamp();b=[];for(var a=0;a<f;a+=3)for(var d=(e[a>>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g<f;g++)b.push(c.charAt(d>>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d<e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
+(function () { var c = CryptoJS, k = c.enc.Utf8; c.algo.HMAC = c.lib.Base.extend({ init: function (a, b) { a = this._hasher = new a.init; "string" == typeof b && (b = k.parse(b)); var c = a.blockSize, e = 4 * c; b.sigBytes > e && (b = a.finalize(b)); b.clamp(); for (var f = this._oKey = b.clone(), g = this._iKey = b.clone(), h = f.words, j = g.words, d = 0; d < c; d++) h[d] ^= 1549556828, j[d] ^= 909522486; f.sigBytes = g.sigBytes = e; this.reset() }, reset: function () { var a = this._hasher; a.reset(); a.update(this._iKey) }, update: function (a) { this._hasher.update(a); return this }, finalize: function (a) { var b = this._hasher; a = b.finalize(a); b.reset(); return b.finalize(this._oKey.clone().concat(a)) } }) })();
+(function () { var h = CryptoJS, j = h.lib.WordArray; h.enc.Base64 = { stringify: function (b) { var e = b.words, f = b.sigBytes, c = this._map; b.clamp(); b = []; for (var a = 0; a < f; a += 3) for (var d = (e[a >>> 2] >>> 24 - 8 * (a % 4) & 255) << 16 | (e[a + 1 >>> 2] >>> 24 - 8 * ((a + 1) % 4) & 255) << 8 | e[a + 2 >>> 2] >>> 24 - 8 * ((a + 2) % 4) & 255, g = 0; 4 > g && a + 0.75 * g < f; g++) b.push(c.charAt(d >>> 6 * (3 - g) & 63)); if (e = c.charAt(64)) for (; b.length % 4;) b.push(e); return b.join("") }, parse: function (b) { var e = b.length, f = this._map, c = f.charAt(64); c && (c = b.indexOf(c), -1 != c && (e = c)); for (var c = [], a = 0, d = 0; d < e; d++) if (d % 4) { var g = f.indexOf(b.charAt(d - 1)) << 2 * (d % 4), h = f.indexOf(b.charAt(d)) >>> 6 - 2 * (d % 4); c[a >>> 2] |= (g | h) << 24 - 8 * (a % 4); a++ } return j.create(c, a) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } })();
+
+hawk.crypto.internals = CryptoJS;
+
+
+// Export if used as a module
+
+if (typeof module !== 'undefined' && module.exports) {
+ module.exports = hawk;
+}
+
+// $lab:coverage:on$
diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/client.js b/deps/npm/node_modules/request/node_modules/hawk/lib/client.js
index 1002a9d517..7fdd48412a 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/lib/client.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/lib/client.js
@@ -60,7 +60,7 @@ exports.header = function (uri, method, options) {
// Application time
- var timestamp = options.timestamp || Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000)
+ var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
// Validate credentials
@@ -105,7 +105,7 @@ exports.header = function (uri, method, options) {
// Calculate payload hash
if (!artifacts.hash &&
- options.hasOwnProperty('payload')) {
+ (options.payload || options.payload === '')) {
artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
}
@@ -119,7 +119,7 @@ exports.header = function (uri, method, options) {
'", ts="' + artifacts.ts +
'", nonce="' + artifacts.nonce +
(artifacts.hash ? '", hash="' + artifacts.hash : '') +
- (hasExt ? '", ext="' + Utils.escapeHeaderAttribute(artifacts.ext) : '') +
+ (hasExt ? '", ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) : '') +
'", mac="' + mac + '"';
if (artifacts.app) {
@@ -137,7 +137,7 @@ exports.header = function (uri, method, options) {
/*
res: node's response object
- artifacts: object recieved from header().artifacts
+ artifacts: object received from header().artifacts
options: {
payload: optional payload received
required: specifies if a Server-Authorization header is required. Defaults to 'false'
@@ -189,7 +189,9 @@ exports.authenticate = function (res, credentials, artifacts, options) {
return false;
}
- if (!options.hasOwnProperty('payload')) {
+ if (!options.payload &&
+ options.payload !== '') {
+
return true;
}
@@ -205,10 +207,6 @@ exports.authenticate = function (res, credentials, artifacts, options) {
// Generate a bewit value for a given URI
/*
- * credentials is an object with the following keys: 'id, 'key', 'algorithm'.
- * options is an object with the following optional keys: 'ext', 'localtimeOffsetMsec'
- */
-/*
uri: 'http://example.com/resource?a=b' or object from Url.parse()
options: {
@@ -245,7 +243,7 @@ exports.getBewit = function (uri, options) {
// Application time
- var now = Utils.now() + (options.localtimeOffsetMsec || 0);
+ var now = Utils.now(options.localtimeOffsetMsec);
// Validate credentials
@@ -284,7 +282,7 @@ exports.getBewit = function (uri, options) {
// Construct bewit: id\exp\mac\ext
var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
- return Utils.base64urlEncode(bewit);
+ return Hoek.base64urlEncode(bewit);
};
@@ -326,7 +324,7 @@ exports.message = function (host, port, message, options) {
// Application time
- var timestamp = options.timestamp || Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000)
+ var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
// Validate credentials
diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/crypto.js b/deps/npm/node_modules/request/node_modules/hawk/lib/crypto.js
index 9825c7d88f..d3c8244a92 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/lib/crypto.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/lib/crypto.js
@@ -54,11 +54,19 @@ exports.calculateMac = function (type, credentials, options) {
exports.generateNormalizedString = function (type, options) {
+ var resource = options.resource || '';
+ if (resource &&
+ resource[0] !== '/') {
+
+ var url = Url.parse(resource, false);
+ resource = url.path; // Includes query
+ }
+
var normalized = 'hawk.' + exports.headerVersion + '.' + type + '\n' +
options.ts + '\n' +
options.nonce + '\n' +
(options.method || '').toUpperCase() + '\n' +
- (options.resource || '') + '\n' +
+ resource + '\n' +
options.host.toLowerCase() + '\n' +
options.port + '\n' +
(options.hash || '') + '\n';
@@ -112,7 +120,7 @@ exports.calculateTsMac = function (ts, credentials) {
exports.timestampMessage = function (credentials, localtimeOffsetMsec) {
- var now = Math.floor((Utils.now() + (localtimeOffsetMsec || 0)) / 1000);
+ var now = Utils.nowSecs(localtimeOffsetMsec);
var tsm = exports.calculateTsMac(now, credentials);
return { ts: now, tsm: tsm };
};
diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/server.js b/deps/npm/node_modules/request/node_modules/hawk/lib/server.js
index 59464ed024..a803930311 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/lib/server.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/lib/server.js
@@ -84,7 +84,7 @@ var internals = {};
exports.authenticate = function (req, credentialsFunc, options, callback) {
- callback = Utils.nextTick(callback);
+ callback = Hoek.nextTick(callback);
// Default options
@@ -93,7 +93,7 @@ exports.authenticate = function (req, credentialsFunc, options, callback) {
// Application time
- var now = Utils.now() + (options.localtimeOffsetMsec || 0); // Measure now before any other processing
+ var now = Utils.now(options.localtimeOffsetMsec); // Measure now before any other processing
// Convert node Http request object to a request configuration object
@@ -167,8 +167,8 @@ exports.authenticate = function (req, credentialsFunc, options, callback) {
// Check payload hash
- if (options.payload !== null &&
- options.payload !== undefined) { // '' is valid
+ if (options.payload ||
+ options.payload === '') {
if (!attributes.hash) {
return callback(Boom.unauthorized('Missing required payload hash', 'Hawk'), credentials, artifacts);
@@ -219,6 +219,19 @@ exports.authenticatePayload = function (payload, credentials, artifacts, content
};
+// Authenticate payload hash - used when payload cannot be provided during authenticate()
+
+/*
+ calculatedHash: the payload hash calculated using Crypto.calculatePayloadHash()
+ artifacts: from authenticate callback
+*/
+
+exports.authenticatePayloadHash = function (calculatedHash, artifacts) {
+
+ return Cryptiles.fixedTimeComparison(calculatedHash, artifacts.hash);
+};
+
+
// Generate a Server-Authorization header for a given response
/*
@@ -267,7 +280,7 @@ exports.header = function (credentials, artifacts, options) {
// Calculate payload hash
if (!artifacts.hash &&
- options.hasOwnProperty('payload')) {
+ (options.payload || options.payload === '')) {
artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
}
@@ -283,7 +296,7 @@ exports.header = function (credentials, artifacts, options) {
artifacts.ext !== undefined &&
artifacts.ext !== '') { // Other falsey values allowed
- header += ', ext="' + Utils.escapeHeaderAttribute(artifacts.ext) + '"';
+ header += ', ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) + '"';
}
return header;
@@ -297,11 +310,11 @@ exports.header = function (credentials, artifacts, options) {
exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
- callback = Utils.nextTick(callback);
+ callback = Hoek.nextTick(callback);
// Application time
- var now = Utils.now() + (options.localtimeOffsetMsec || 0);
+ var now = Utils.now(options.localtimeOffsetMsec);
// Convert node Http request object to a request configuration object
@@ -335,12 +348,12 @@ exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
// No other authentication
if (request.authorization) {
- return callback(Boom.badRequest('Multiple authentications', 'Hawk'));
+ return callback(Boom.badRequest('Multiple authentications'));
}
// Parse bewit
- var bewitString = Utils.base64urlDecode(resource[3]);
+ var bewitString = Hoek.base64urlDecode(resource[3]);
if (bewitString instanceof Error) {
return callback(Boom.badRequest('Invalid bewit encoding'));
}
@@ -348,9 +361,7 @@ exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
// Bewit format: id\exp\mac\ext ('\' is used because it is a reserved header attribute character)
var bewitParts = bewitString.split('\\');
- if (!bewitParts ||
- bewitParts.length !== 4) {
-
+ if (bewitParts.length !== 4) {
return callback(Boom.badRequest('Invalid bewit structure'));
}
@@ -433,7 +444,7 @@ exports.authenticateBewit = function (req, credentialsFunc, options, callback) {
exports.authenticateMessage = function (host, port, message, authorization, credentialsFunc, options, callback) {
- callback = Utils.nextTick(callback);
+ callback = Hoek.nextTick(callback);
// Default options
@@ -442,7 +453,7 @@ exports.authenticateMessage = function (host, port, message, authorization, cred
// Application time
- var now = Utils.now() + (options.localtimeOffsetMsec || 0); // Measure now before any other processing
+ var now = Utils.now(options.localtimeOffsetMsec); // Measure now before any other processing
// Validate authorization
diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js b/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js
index c8938fe829..de74606f33 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/lib/utils.js
@@ -1,6 +1,5 @@
// Load modules
-var Hoek = require('hoek');
var Sntp = require('sntp');
var Boom = require('boom');
@@ -10,30 +9,18 @@ var Boom = require('boom');
var internals = {};
-// Import Hoek Utilities
-
-internals.import = function () {
-
- for (var i in Hoek) {
- if (Hoek.hasOwnProperty(i)) {
- exports[i] = Hoek[i];
- }
- }
-};
-
-internals.import();
-
-
-// Hawk version
-
exports.version = function () {
- return exports.loadPackage(__dirname + '/..').version;
+ return require('../package.json').version;
};
// Extract host and port from request
+// $1 $2
+internals.hostHeaderRegex = /^(?:(?:\r\n)?\s)*((?:[^:]+)|(?:\[[^\]]+\]))(?::(\d+))?(?:(?:\r\n)?\s)*$/; // (IPv4, hostname)|(IPv6)
+
+
exports.parseHost = function (req, hostHeaderName) {
hostHeaderName = (hostHeaderName ? hostHeaderName.toLowerCase() : 'host');
@@ -42,20 +29,8 @@ exports.parseHost = function (req, hostHeaderName) {
return null;
}
- var hostHeaderRegex;
- if (hostHeader[0] === '[') {
- hostHeaderRegex = /^(?:(?:\r\n)?\s)*(\[[^\]]+\])(?::(\d+))?(?:(?:\r\n)?\s)*$/; // IPv6
- }
- else {
- hostHeaderRegex = /^(?:(?:\r\n)?\s)*([^:]+)(?::(\d+))?(?:(?:\r\n)?\s)*$/; // IPv4, hostname
- }
-
- var hostParts = hostHeader.match(hostHeaderRegex);
-
- if (!hostParts ||
- hostParts.length !== 3 ||
- !hostParts[1]) {
-
+ var hostParts = hostHeader.match(internals.hostHeaderRegex);
+ if (!hostParts) {
return null;
}
@@ -108,9 +83,15 @@ exports.parseRequest = function (req, options) {
};
-exports.now = function () {
+exports.now = function (localtimeOffsetMsec) {
+
+ return Sntp.now() + (localtimeOffsetMsec || 0);
+};
+
+
+exports.nowSecs = function (localtimeOffsetMsec) {
- return Sntp.now();
+ return Math.floor(exports.now(localtimeOffsetMsec) / 1000);
};
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/CONTRIBUTING.md b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/CONTRIBUTING.md
new file mode 100644
index 0000000000..892836159b
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/CONTRIBUTING.md
@@ -0,0 +1 @@
+Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE
index 911b97ee67..394688939d 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2012-2013, Walmart.
+Copyright (c) 2012-2014, Walmart and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -8,17 +8,21 @@ modification, are permitted provided that the following conditions are met:
* 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.
- * Neither the name of Walmart nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
+ * The names of any contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 WALMART BE LIABLE FOR ANY
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hapijs/boom/graphs/contributors \ No newline at end of file
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
index 884ec6db15..07a7f67126 100755
--- 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
@@ -1,11 +1,9 @@
test:
- @node node_modules/lab/bin/lab
-test-cov:
- @node node_modules/lab/bin/lab -r threshold -t 100
+ @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 -r html -o coverage.html
-complexity:
- @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib
+ @node node_modules/lab/bin/lab -a code -r html -o coverage.html
-.PHONY: test test-cov test-cov-html complexity
+.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 1970b1c425..c6ada264aa 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
@@ -1,6 +1,575 @@
-<a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a>
-![boom Logo](https://raw.github.com/spumko/boom/master/images/boom.png)
+![boom Logo](https://raw.github.com/hapijs/boom/master/images/boom.png)
HTTP-friendly error objects
-[![Build Status](https://secure.travis-ci.org/spumko/boom.png)](http://travis-ci.org/spumko/boom)
+[![Build Status](https://secure.travis-ci.org/hapijs/boom.png)](http://travis-ci.org/hapijs/boom)
+
+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.
+- `message` - the error message.
+- `output` - the formatted response. Can be directly manipulated after object construction to return a custom
+ error response. Allowed root keys:
+ - `statusCode` - the HTTP status code (typically 4xx or 5xx).
+ - `headers` - an object containing any HTTP headers where each key is a header name and value is the header content.
+ - `payload` - the formatted object used as the response payload (stringified). Can be directly manipulated but any
+ changes will be lost
+ if `reformat()` is called. Any content allowed and by default includes the following content:
+ - `statusCode` - the HTTP status code, derived from `error.output.statusCode`.
+ - `error` - the HTTP status message (e.g. 'Bad Request', 'Internal Server Error') derived from `statusCode`.
+ - `message` - the error message derived from `error.message`.
+- inherited `Error` properties.
+
+The `Boom` object also supports the following method:
+- `reformat()` - rebuilds `error.output` using the other object properties.
+
+## Helper Methods
+
+### `wrap(error, [statusCode], [message])`
+
+Decorates an error with the **boom** properties where:
+- `error` - the error object to wrap. If `error` is already a **boom** object, returns back the same object.
+- `statusCode` - optional HTTP status code. Defaults to `500`.
+- `message` - optional message string. If the error already has a message, it adds the message as a prefix.
+ Defaults to no message.
+
+```js
+var error = new Error('Unexpected input');
+Boom.wrap(error, 400);
+```
+
+### `create(statusCode, [message], [data])`
+
+Generates an `Error` object with the **boom** decorations where:
+- `statusCode` - an HTTP error code number. Must be greater or equal 400.
+- `message` - optional message string.
+- `data` - additional error data set to `error.data` property.
+
+```js
+var error = Boom.create(400, 'Bad request', { timestamp: Date.now() });
+```
+
+## HTTP 4xx Errors
+
+### `Boom.badRequest([message], [data])`
+
+Returns a 400 Bad Request error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.badRequest('invalid query');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 400,
+ "error": "Bad Request",
+ "message": "invalid query"
+}
+```
+
+### `Boom.unauthorized([message], [scheme], [attributes])`
+
+Returns a 401 Unauthorized error where:
+- `message` - optional message.
+- `scheme` can be one of the following:
+ - an authentication scheme name
+ - an array of string values. These values will be separated by ', ' and set to the 'WWW-Authenticate' header.
+- `attributes` - an object of values to use while setting the 'WWW-Authenticate' header. This value is only used when `schema` is a string, otherwise it is ignored. Every key/value pair will be included in the 'WWW-Authenticate' in the format of 'key="value"'. `null` and `undefined` will be replaced with an empty string. If `attributes` is set, `message` will be used as the 'error' segment of the 'WWW-Authenticate' header. If `message` is unset, the 'error' segment of the header will not be present and `isMissing` will be true on the error object.
+
+If either `scheme` or `attributes` are set, the resultant `Boom` object will have the 'WWW-Authenticate' header set for the response.
+
+```js
+Boom.unauthorized('invalid password');
+```
+
+Generates the following response:
+
+```json
+"payload": {
+ "statusCode": 401,
+ "error": "Unauthorized",
+ "message": "invalid password"
+},
+"headers" {}
+```
+
+```js
+Boom.unauthorized('invalid password', 'sample');
+```
+
+Generates the following response:
+
+```json
+"payload": {
+ "statusCode": 401,
+ "error": "Unauthorized",
+ "message": "invalid password"
+},
+"headers" {
+ "WWW-Authenticate": "sample error=\"invalid password\""
+}
+```
+
+```js
+Boom.unauthorized('invalid password', 'sample', { ttl: 0, cache: null, foo: 'bar' });
+```
+
+Generates the following response:
+
+```json
+"payload": {
+ "statusCode": 401,
+ "error": "Unauthorized",
+ "message": "invalid password"
+},
+"headers" {
+ "WWW-Authenticate": "sample ttl=\"0\", cache=\"\", foo=\"bar\", error=\"invalid password\""
+}
+```
+
+### `Boom.forbidden([message], [data])`
+
+Returns a 403 Forbidden error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.forbidden('try again some time');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 403,
+ "error": "Forbidden",
+ "message": "try again some time"
+}
+```
+
+### `Boom.notFound([message], [data])`
+
+Returns a 404 Not Found error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.notFound('missing');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 404,
+ "error": "Not Found",
+ "message": "missing"
+}
+```
+
+### `Boom.methodNotAllowed([message], [data])`
+
+Returns a 405 Method Not Allowed error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.methodNotAllowed('that method is not allowed');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 405,
+ "error": "Method Not Allowed",
+ "message": "that method is not allowed"
+}
+```
+
+### `Boom.notAcceptable([message], [data])`
+
+Returns a 406 Not Acceptable error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.notAcceptable('unacceptable');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 406,
+ "error": "Not Acceptable",
+ "message": "unacceptable"
+}
+```
+
+### `Boom.proxyAuthRequired([message], [data])`
+
+Returns a 407 Proxy Authentication Required error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.proxyAuthRequired('auth missing');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 407,
+ "error": "Proxy Authentication Required",
+ "message": "auth missing"
+}
+```
+
+### `Boom.clientTimeout([message], [data])`
+
+Returns a 408 Request Time-out error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.clientTimeout('timed out');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 408,
+ "error": "Request Time-out",
+ "message": "timed out"
+}
+```
+
+### `Boom.conflict([message], [data])`
+
+Returns a 409 Conflict error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.conflict('there was a conflict');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 409,
+ "error": "Conflict",
+ "message": "there was a conflict"
+}
+```
+
+### `Boom.resourceGone([message], [data])`
+
+Returns a 410 Gone error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.resourceGone('it is gone');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 410,
+ "error": "Gone",
+ "message": "it is gone"
+}
+```
+
+### `Boom.lengthRequired([message], [data])`
+
+Returns a 411 Length Required error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.lengthRequired('length needed');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 411,
+ "error": "Length Required",
+ "message": "length needed"
+}
+```
+
+### `Boom.preconditionFailed([message], [data])`
+
+Returns a 412 Precondition Failed error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.preconditionFailed();
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 412,
+ "error": "Precondition Failed"
+}
+```
+
+### `Boom.entityTooLarge([message], [data])`
+
+Returns a 413 Request Entity Too Large error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.entityTooLarge('too big');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 413,
+ "error": "Request Entity Too Large",
+ "message": "too big"
+}
+```
+
+### `Boom.uriTooLong([message], [data])`
+
+Returns a 414 Request-URI Too Large error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.uriTooLong('uri is too long');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 414,
+ "error": "Request-URI Too Large",
+ "message": "uri is too long"
+}
+```
+
+### `Boom.unsupportedMediaType([message], [data])`
+
+Returns a 415 Unsupported Media Type error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.unsupportedMediaType('that media is not supported');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 415,
+ "error": "Unsupported Media Type",
+ "message": "that media is not supported"
+}
+```
+
+### `Boom.rangeNotSatisfiable([message], [data])`
+
+Returns a 416 Requested Range Not Satisfiable error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.rangeNotSatisfiable();
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 416,
+ "error": "Requested Range Not Satisfiable"
+}
+```
+
+### `Boom.expectationFailed([message], [data])`
+
+Returns a 417 Expectation Failed error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.expectationFailed('expected this to work');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 417,
+ "error": "Expectation Failed",
+ "message": "expected this to work"
+}
+```
+
+### `Boom.badData([message], [data])`
+
+Returns a 422 Unprocessable Entity error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.badData('your data is bad and you should feel bad');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 422,
+ "error": "Unprocessable Entity",
+ "message": "your data is bad and you should feel bad"
+}
+```
+
+### `Boom.tooManyRequests([message], [data])`
+
+Returns a 422 Too Many Requests error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.tooManyRequests('you have exceeded your request limit');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 429,
+ "error": "Too Many Requests",
+ "message": "you have exceeded your request limit"
+}
+```
+
+## HTTP 5xx Errors
+
+All 500 errors hide your message from the end user. Your message is recorded in the server log.
+
+### `Boom.notImplemented([message], [data])`
+
+Returns a 501 Not Implemented error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.notImplemented('method not implemented');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 501,
+ "error": "Not Implemented",
+ "message": "method not implemented"
+}
+```
+
+### `Boom.badGateway([message], [data])`
+
+Returns a 502 Bad Gateway error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.badGateway('that is a bad gateway');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 502,
+ "error": "Bad Gateway",
+ "message": "that is a bad gateway"
+}
+```
+
+### `Boom.serverTimeout([message], [data])`
+
+Returns a 503 Service Unavailable error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.serverTimeout('unavailable');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 503,
+ "error": "Service Unavailable",
+ "message": "unavailable"
+}
+```
+
+### `Boom.gatewayTimeout([message], [data])`
+
+Returns a 504 Gateway Time-out error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.gatewayTimeout();
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 504,
+ "error": "Gateway Time-out"
+}
+```
+
+### `Boom.badImplementation([message], [data])`
+
+Returns a 500 Internal Server Error error where:
+- `message` - optional message.
+- `data` - optional additional error data.
+
+```js
+Boom.badImplementation('terrible implementation');
+```
+
+Generates the following response payload:
+
+```json
+{
+ "statusCode": 500,
+ "error": "Internal Server Error",
+ "message": "An internal server error occurred"
+}
+```
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 0bbeed9509..c34bf6a19a 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
@@ -1,7 +1,6 @@
// Load modules
var Http = require('http');
-var NodeUtil = require('util');
var Hoek = require('hoek');
@@ -10,86 +9,88 @@ var Hoek = require('hoek');
var internals = {};
-exports = module.exports = internals.Boom = function (/* (new Error) or (code, message) */) {
+exports.wrap = function (error, statusCode, message) {
- var self = this;
+ Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');
+ return (error.isBoom ? error : internals.initialize(error, statusCode || 500, message));
+};
- Hoek.assert(this.constructor === internals.Boom, 'Error must be instantiated using new');
- Error.call(this);
- this.isBoom = true;
+exports.create = function (statusCode, message, data) {
- this.response = {
- code: 0,
- payload: {},
- headers: {}
- // type: 'content-type'
- };
+ var error = new Error(message ? message : undefined); // Avoids settings null message
+ error.data = data || null;
+ internals.initialize(error, statusCode);
+ return error;
+};
- if (arguments[0] instanceof Error) {
- // Error
+internals.initialize = function (error, statusCode, message) {
- var error = arguments[0];
+ Hoek.assert(!isNaN(parseFloat(statusCode)) && isFinite(statusCode) && statusCode >= 400, 'First argument must be a number (400+):', statusCode);
- this.data = error;
- this.response.code = error.code || 500;
- if (error.message) {
- this.message = error.message;
- }
+ error.isBoom = true;
+
+ if (!error.hasOwnProperty('data')) {
+ error.data = null;
}
- else {
- // code, message
+ error.output = {
+ statusCode: statusCode,
+ payload: {},
+ headers: {}
+ };
- var code = arguments[0];
- var message = arguments[1];
+ error.reformat = internals.reformat;
+ error.reformat();
- Hoek.assert(!isNaN(parseFloat(code)) && isFinite(code) && code >= 400, 'First argument must be a number (400+)');
+ if (!message &&
+ !error.message) {
- this.response.code = code;
- if (message) {
- this.message = message;
- }
+ message = error.output.payload.error;
}
- // Response format
-
- this.reformat();
+ if (message) {
+ error.message = (message + (error.message ? ': ' + error.message : ''));
+ }
- return this;
+ return error;
};
-NodeUtil.inherits(internals.Boom, Error);
+internals.reformat = function () {
-internals.Boom.prototype.reformat = function () {
+ this.output.payload.statusCode = this.output.statusCode;
+ this.output.payload.error = Http.STATUS_CODES[this.output.statusCode] || 'Unknown';
- this.response.payload.code = this.response.code;
- this.response.payload.error = Http.STATUS_CODES[this.response.code] || 'Unknown';
- if (this.message) {
- this.response.payload.message = Hoek.escapeHtml(this.message); // Prevent XSS from error message
+ if (this.output.statusCode === 500) {
+ this.output.payload.message = 'An internal server error occurred'; // Hide actual error from user
+ }
+ else if (this.message) {
+ this.output.payload.message = this.message;
}
};
-// Utilities
+// 4xx Client Errors
-internals.Boom.badRequest = function (message) {
+exports.badRequest = function (message, data) {
- return new internals.Boom(400, message);
+ return exports.create(400, message, data);
};
-internals.Boom.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[])
+exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[])
- var err = new internals.Boom(401, message);
+ var err = exports.create(401, message);
if (!scheme) {
return err;
}
var wwwAuthenticate = '';
+ var i = 0;
+ var il = 0;
if (typeof scheme === 'string') {
@@ -98,7 +99,7 @@ internals.Boom.unauthorized = function (message, scheme, attributes) {
wwwAuthenticate = scheme;
if (attributes) {
var names = Object.keys(attributes);
- for (var i = 0, il = names.length; i < il; ++i) {
+ for (i = 0, il = names.length; i < il; ++i) {
if (i) {
wwwAuthenticate += ',';
}
@@ -128,7 +129,7 @@ internals.Boom.unauthorized = function (message, scheme, attributes) {
// function (message, wwwAuthenticate[])
var wwwArray = scheme;
- for (var i = 0, il = wwwArray.length; i < il; ++i) {
+ for (i = 0, il = wwwArray.length; i < il; ++i) {
if (i) {
wwwAuthenticate += ', ';
}
@@ -137,71 +138,155 @@ internals.Boom.unauthorized = function (message, scheme, attributes) {
}
}
- err.response.headers['WWW-Authenticate'] = wwwAuthenticate;
+ err.output.headers['WWW-Authenticate'] = wwwAuthenticate;
return err;
};
-internals.Boom.clientTimeout = function (message) {
+exports.forbidden = function (message, data) {
- return new internals.Boom(408, message);
+ return exports.create(403, message, data);
};
-internals.Boom.serverTimeout = function (message) {
+exports.notFound = function (message, data) {
- return new internals.Boom(503, message);
+ return exports.create(404, message, data);
};
-internals.Boom.forbidden = function (message) {
+exports.methodNotAllowed = function (message, data) {
- return new internals.Boom(403, message);
+ return exports.create(405, message, data);
};
-internals.Boom.notFound = function (message) {
+exports.notAcceptable = function (message, data) {
- return new internals.Boom(404, message);
+ return exports.create(406, message, data);
};
-internals.Boom.internal = function (message, data) {
+exports.proxyAuthRequired = function (message, data) {
- var err = new internals.Boom(500, message);
+ return exports.create(407, message, data);
+};
- if (data && data.stack) {
- err.trace = data.stack.split('\n');
- err.outterTrace = Hoek.displayStack(1);
- }
- else {
- err.trace = Hoek.displayStack(1);
+
+exports.clientTimeout = function (message, data) {
+
+ return exports.create(408, message, data);
+};
+
+
+exports.conflict = function (message, data) {
+
+ return exports.create(409, message, data);
+};
+
+
+exports.resourceGone = function (message, data) {
+
+ return exports.create(410, message, data);
+};
+
+
+exports.lengthRequired = function (message, data) {
+
+ return exports.create(411, message, data);
+};
+
+
+exports.preconditionFailed = function (message, data) {
+
+ return exports.create(412, message, data);
+};
+
+
+exports.entityTooLarge = function (message, data) {
+
+ return exports.create(413, message, data);
+};
+
+
+exports.uriTooLong = function (message, data) {
+
+ return exports.create(414, message, data);
+};
+
+
+exports.unsupportedMediaType = function (message, data) {
+
+ return exports.create(415, message, data);
+};
+
+
+exports.rangeNotSatisfiable = function (message, data) {
+
+ return exports.create(416, message, data);
+};
+
+
+exports.expectationFailed = function (message, data) {
+
+ return exports.create(417, message, data);
+};
+
+exports.badData = function (message, data) {
+
+ return exports.create(422, message, data);
+};
+
+
+exports.tooManyRequests = function (message, data) {
+
+ return exports.create(429, message, data);
+};
+
+
+// 5xx Server Errors
+
+exports.internal = function (message, data, statusCode) {
+
+ var error = (data instanceof Error ? exports.wrap(data, statusCode, message) : exports.create(statusCode || 500, message));
+
+ if (data instanceof Error === false) {
+ error.data = data;
}
- err.data = data;
- err.response.payload.message = 'An internal server error occurred'; // Hide actual error from user
+ return error;
+};
- return err;
+
+exports.notImplemented = function (message, data) {
+
+ return exports.internal(message, data, 501);
};
-internals.Boom.passThrough = function (code, payload, contentType, headers) {
+exports.badGateway = function (message, data) {
- var err = new internals.Boom(500, 'Pass-through'); // 500 code is only used to initialize
+ return exports.internal(message, data, 502);
+};
- err.data = {
- code: code,
- payload: payload,
- type: contentType
- };
- err.response.code = code;
- err.response.type = contentType;
- err.response.headers = headers;
- err.response.payload = payload;
+exports.serverTimeout = function (message, data) {
- return err;
+ return exports.internal(message, data, 503);
+};
+
+
+exports.gatewayTimeout = function (message, data) {
+
+ return exports.internal(message, data, 504);
};
+exports.badImplementation = function (message, data) {
+
+ var err = exports.internal(message, data, 500);
+ err.isDeveloperError = true;
+ return err;
+};
+
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 c7875b4cbb..c5f765de26 100755
--- 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,16 +1,10 @@
{
"name": "boom",
"description": "HTTP-friendly error objects",
- "version": "0.4.2",
- "author": {
- "name": "Eran Hammer",
- "email": "eran@hueniverse.com",
- "url": "http://hueniverse.com"
- },
- "contributors": [],
+ "version": "2.6.1",
"repository": {
"type": "git",
- "url": "git://github.com/spumko/boom"
+ "url": "git://github.com/hapijs/boom"
},
"main": "index",
"keywords": [
@@ -21,11 +15,11 @@
"node": ">=0.8.0"
},
"dependencies": {
- "hoek": "0.9.x"
+ "hoek": "2.x.x"
},
"devDependencies": {
- "lab": "0.1.x",
- "complexity-report": "0.x.x"
+ "code": "1.x.x",
+ "lab": "5.x.x"
},
"scripts": {
"test": "make test-cov"
@@ -33,16 +27,18 @@
"licenses": [
{
"type": "BSD",
- "url": "http://github.com/spumko/boom/raw/master/LICENSE"
+ "url": "http://github.com/hapijs/boom/raw/master/LICENSE"
}
],
- "_id": "boom@0.4.2",
- "dist": {
- "shasum": "7a636e9ded4efcefb19cef4947a3c67dfaee911b",
- "tarball": "http://registry.npmjs.org/boom/-/boom-0.4.2.tgz"
+ "gitHead": "860d6f8b0db89b263418b8575c65560482cbd1ba",
+ "bugs": {
+ "url": "https://github.com/hapijs/boom/issues"
},
- "_from": "boom@>=0.4.0 <0.5.0",
- "_npmVersion": "1.2.18",
+ "homepage": "https://github.com/hapijs/boom",
+ "_id": "boom@2.6.1",
+ "_shasum": "4dc8ef9b6dfad9c43bbbfbe71fa4c21419f22753",
+ "_from": "boom@>=2.0.0 <3.0.0",
+ "_npmVersion": "1.4.28",
"_npmUser": {
"name": "hueniverse",
"email": "eran@hueniverse.com"
@@ -51,14 +47,21 @@
{
"name": "hueniverse",
"email": "eran@hueniverse.com"
+ },
+ {
+ "name": "wyatt",
+ "email": "wpreul@gmail.com"
+ },
+ {
+ "name": "arb",
+ "email": "arbretz@gmail.com"
}
],
- "directories": {},
- "_shasum": "7a636e9ded4efcefb19cef4947a3c67dfaee911b",
- "_resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz",
- "bugs": {
- "url": "https://github.com/spumko/boom/issues"
+ "dist": {
+ "shasum": "4dc8ef9b6dfad9c43bbbfbe71fa4c21419f22753",
+ "tarball": "http://registry.npmjs.org/boom/-/boom-2.6.1.tgz"
},
- "readme": "ERROR: No README data found!",
- "homepage": "https://github.com/spumko/boom"
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/boom/-/boom-2.6.1.tgz",
+ "readme": "ERROR: No README data found!"
}
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 a20c1c345a..68ae4172c9 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
@@ -1,7 +1,9 @@
// Load modules
-var Lab = require('lab');
+var Util = require('util');
+var Code = require('code');
var Boom = require('../lib');
+var Lab = require('lab');
// Declare internals
@@ -11,235 +13,580 @@ var internals = {};
// Test shortcuts
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
+var lab = exports.lab = Lab.script();
+var describe = lab.describe;
+var it = lab.it;
+var expect = Code.expect;
+
+
+it('returns the same object when already boom', function (done) {
+
+ var error = Boom.badRequest();
+ var wrapped = Boom.wrap(error);
+ expect(error).to.equal(wrapped);
+ done();
+});
+it('returns an error with info when constructed using another error', function (done) {
+
+ var error = new Error('ka-boom');
+ error.xyz = 123;
+ var err = Boom.wrap(error);
+ expect(err.xyz).to.equal(123);
+ expect(err.message).to.equal('ka-boom');
+ expect(err.output).to.deep.equal({
+ statusCode: 500,
+ payload: {
+ statusCode: 500,
+ error: 'Internal Server Error',
+ message: 'An internal server error occurred'
+ },
+ headers: {}
+ });
+ expect(err.data).to.equal(null);
+ done();
+});
-describe('Boom', function () {
+it('does not override data when constructed using another error', function (done) {
+
+ var error = new Error('ka-boom');
+ error.data = { useful: 'data' };
+ var err = Boom.wrap(error);
+ expect(err.data).to.equal(error.data);
+ done();
+});
- it('returns an error with info when constructed using another error', function (done) {
+it('sets new message when none exists', function (done) {
- var error = new Error('ka-boom');
- error.xyz = 123;
- var err = new Boom(error);
- expect(err.data.xyz).to.equal(123);
- expect(err.message).to.equal('ka-boom');
- expect(err.response).to.deep.equal({
- code: 500,
- payload: {
- code: 500,
- error: 'Internal Server Error',
- message: 'ka-boom'
- },
- headers: {}
- });
+ var error = new Error();
+ var wrapped = Boom.wrap(error, 400, 'something bad');
+ expect(wrapped.message).to.equal('something bad');
+ done();
+});
+
+it('throws when statusCode is not a number', function (done) {
+
+ expect(function () {
+
+ Boom.create('x');
+ }).to.throw('First argument must be a number (400+): x');
+ done();
+});
+
+it('throws when statusCode is not finite', function (done) {
+
+ expect(function () {
+
+ Boom.create(1 / 0);
+ }).to.throw('First argument must be a number (400+): null');
+ done();
+});
+
+it('sets error code to unknown', function (done) {
+
+ var err = Boom.create(999);
+ expect(err.output.payload.error).to.equal('Unknown');
+ done();
+});
+
+describe('create()', function () {
+
+ it('does not sets null message', function (done) {
+
+ var error = Boom.unauthorized(null);
+ expect(error.output.payload.message).to.not.exist();
done();
});
- describe('#isBoom', function () {
+ it('sets message and data', function (done) {
- it('returns true for Boom object', function (done) {
+ var error = Boom.badRequest('Missing data', { type: 'user' });
+ expect(error.data.type).to.equal('user');
+ expect(error.output.payload.message).to.equal('Missing data');
+ done();
+ });
+});
- expect(Boom.badRequest().isBoom).to.equal(true);
- done();
- });
+describe('isBoom()', function () {
- it('returns false for Error object', function (done) {
+ it('returns true for Boom object', function (done) {
- expect(new Error().isBoom).to.not.exist;
- done();
- });
+ expect(Boom.badRequest().isBoom).to.equal(true);
+ done();
});
- describe('#badRequest', function () {
+ it('returns false for Error object', function (done) {
- it('returns a 400 error code', function (done) {
+ expect((new Error()).isBoom).to.not.exist();
+ done();
+ });
+});
- expect(Boom.badRequest().response.code).to.equal(400);
- done();
- });
+describe('badRequest()', function () {
- it('sets the message with the passed in message', function (done) {
+ it('returns a 400 error statusCode', function (done) {
- expect(Boom.badRequest('my message').message).to.equal('my message');
- done();
- });
+ expect(Boom.badRequest().output.statusCode).to.equal(400);
+ done();
});
- describe('#unauthorized', function () {
+ it('sets the message with the passed in message', function (done) {
- it('returns a 401 error code', function (done) {
+ expect(Boom.badRequest('my message').message).to.equal('my message');
+ done();
+ });
- var err = Boom.unauthorized();
- expect(err.response.code).to.equal(401);
- expect(err.response.headers).to.deep.equal({});
- done();
- });
+ it('sets the message to HTTP status if none provided', function (done) {
- it('sets the message with the passed in message', function (done) {
+ expect(Boom.badRequest().message).to.equal('Bad Request');
+ done();
+ });
+});
- expect(Boom.unauthorized('my message').message).to.equal('my message');
- done();
- });
+describe('unauthorized()', function () {
- it('returns a WWW-Authenticate header when passed a scheme', function (done) {
+ it('returns a 401 error statusCode', function (done) {
- var err = Boom.unauthorized('boom', 'Test');
- expect(err.response.code).to.equal(401);
- expect(err.response.headers['WWW-Authenticate']).to.equal('Test error="boom"');
- done();
- });
+ var err = Boom.unauthorized();
+ expect(err.output.statusCode).to.equal(401);
+ expect(err.output.headers).to.deep.equal({});
+ done();
+ });
- it('returns a WWW-Authenticate header when passed a scheme and attributes', function (done) {
+ it('sets the message with the passed in message', function (done) {
- var err = Boom.unauthorized('boom', 'Test', { a: 1, b: 'something', c: null, d: 0 });
- expect(err.response.code).to.equal(401);
- expect(err.response.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0", error="boom"');
- done();
- });
+ expect(Boom.unauthorized('my message').message).to.equal('my message');
+ done();
+ });
- it('sets the isMissing flag when error message is empty', function (done) {
+ it('returns a WWW-Authenticate header when passed a scheme', function (done) {
- var err = Boom.unauthorized('', 'Basic');
- expect(err.isMissing).to.equal(true);
- done();
- });
+ var err = Boom.unauthorized('boom', 'Test');
+ expect(err.output.statusCode).to.equal(401);
+ expect(err.output.headers['WWW-Authenticate']).to.equal('Test error="boom"');
+ done();
+ });
- it('does not set the isMissing flag when error message is not empty', function (done) {
+ it('returns a WWW-Authenticate header set to the schema array value', function (done) {
- var err = Boom.unauthorized('message', 'Basic');
- expect(err.isMissing).to.equal(undefined);
- done();
- });
+ var err = Boom.unauthorized(null, ['Test','one','two']);
+ expect(err.output.statusCode).to.equal(401);
+ expect(err.output.headers['WWW-Authenticate']).to.equal('Test, one, two');
+ done();
+ });
- it('sets a WWW-Authenticate when passed as an array', function (done) {
+ it('returns a WWW-Authenticate header when passed a scheme and attributes', function (done) {
- var err = Boom.unauthorized('message', ['Basic', 'Example e="1"', 'Another x="3", y="4"']);
- expect(err.response.headers['WWW-Authenticate']).to.equal('Basic, Example e="1", Another x="3", y="4"');
- done();
- });
+ var err = Boom.unauthorized('boom', 'Test', { a: 1, b: 'something', c: null, d: 0 });
+ expect(err.output.statusCode).to.equal(401);
+ expect(err.output.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0", error="boom"');
+ done();
});
- describe('#clientTimeout', function () {
+ it('returns a WWW-Authenticate header when passed attributes, missing error', function (done) {
- it('returns a 408 error code', function (done) {
+ var err = Boom.unauthorized(null, 'Test', { a: 1, b: 'something', c: null, d: 0 });
+ expect(err.output.statusCode).to.equal(401);
+ expect(err.output.headers['WWW-Authenticate']).to.equal('Test a="1", b="something", c="", d="0"');
+ expect(err.isMissing).to.equal(true);
+ done();
+ });
- expect(Boom.clientTimeout().response.code).to.equal(408);
- done();
- });
+ it('sets the isMissing flag when error message is empty', function (done) {
- it('sets the message with the passed in message', function (done) {
+ var err = Boom.unauthorized('', 'Basic');
+ expect(err.isMissing).to.equal(true);
+ done();
+ });
- expect(Boom.clientTimeout('my message').message).to.equal('my message');
- done();
- });
+ it('does not set the isMissing flag when error message is not empty', function (done) {
+
+ var err = Boom.unauthorized('message', 'Basic');
+ expect(err.isMissing).to.equal(undefined);
+ done();
});
- describe('#serverTimeout', function () {
+ it('sets a WWW-Authenticate when passed as an array', function (done) {
- it('returns a 503 error code', function (done) {
+ var err = Boom.unauthorized('message', ['Basic', 'Example e="1"', 'Another x="3", y="4"']);
+ expect(err.output.headers['WWW-Authenticate']).to.equal('Basic, Example e="1", Another x="3", y="4"');
+ done();
+ });
+});
- expect(Boom.serverTimeout().response.code).to.equal(503);
- done();
- });
- it('sets the message with the passed in message', function (done) {
+describe('methodNotAllowed()', function () {
- expect(Boom.serverTimeout('my message').message).to.equal('my message');
- done();
- });
+ it('returns a 405 error statusCode', function (done) {
+
+ expect(Boom.methodNotAllowed().output.statusCode).to.equal(405);
+ done();
});
- describe('#forbidden', function () {
+ it('sets the message with the passed in message', function (done) {
- it('returns a 403 error code', function (done) {
+ expect(Boom.methodNotAllowed('my message').message).to.equal('my message');
+ done();
+ });
+});
- expect(Boom.forbidden().response.code).to.equal(403);
- done();
- });
- it('sets the message with the passed in message', function (done) {
+describe('notAcceptable()', function () {
- expect(Boom.forbidden('my message').message).to.equal('my message');
- done();
- });
+ it('returns a 406 error statusCode', function (done) {
+
+ expect(Boom.notAcceptable().output.statusCode).to.equal(406);
+ done();
});
- describe('#notFound', function () {
+ it('sets the message with the passed in message', function (done) {
- it('returns a 404 error code', function (done) {
+ expect(Boom.notAcceptable('my message').message).to.equal('my message');
+ done();
+ });
+});
- expect(Boom.notFound().response.code).to.equal(404);
- done();
- });
- it('sets the message with the passed in message', function (done) {
+describe('proxyAuthRequired()', function () {
- expect(Boom.notFound('my message').message).to.equal('my message');
- done();
- });
+ it('returns a 407 error statusCode', function (done) {
+
+ expect(Boom.proxyAuthRequired().output.statusCode).to.equal(407);
+ done();
});
- describe('#internal', function () {
+ it('sets the message with the passed in message', function (done) {
- it('returns a 500 error code', function (done) {
+ expect(Boom.proxyAuthRequired('my message').message).to.equal('my message');
+ done();
+ });
+});
- expect(Boom.internal().response.code).to.equal(500);
- done();
- });
- it('sets the message with the passed in message', function (done) {
+describe('clientTimeout()', function () {
- var err = Boom.internal('my message');
- expect(err.message).to.equal('my message');
- expect(err.response.payload.message).to.equal('An internal server error occurred');
- done();
- });
+ it('returns a 408 error statusCode', function (done) {
- it('passes data on the callback if its passed in', function (done) {
+ expect(Boom.clientTimeout().output.statusCode).to.equal(408);
+ done();
+ });
- expect(Boom.internal('my message', { my: 'data' }).data.my).to.equal('data');
- done();
- });
+ it('sets the message with the passed in message', function (done) {
- it('uses passed in stack if its available', function (done) {
+ expect(Boom.clientTimeout('my message').message).to.equal('my message');
+ done();
+ });
+});
- var error = new Error();
- error.stack = 'my stack line\nmy second stack line';
- expect(Boom.internal('my message', error).trace[0]).to.equal('my stack line');
- done();
- });
+
+describe('conflict()', function () {
+
+ it('returns a 409 error statusCode', function (done) {
+
+ expect(Boom.conflict().output.statusCode).to.equal(409);
+ done();
});
- describe('#passThrough', function () {
+ it('sets the message with the passed in message', function (done) {
- it('returns a pass-through error', function (done) {
+ expect(Boom.conflict('my message').message).to.equal('my message');
+ done();
+ });
+});
- var err = Boom.passThrough(499, { a: 1 }, 'application/text', { 'X-Test': 'Boom' });
- expect(err.response.code).to.equal(499);
- expect(err.message).to.equal('Pass-through');
- expect(err.response).to.deep.equal({
- code: 499,
- payload: { a: 1 },
- headers: { 'X-Test': 'Boom' },
- type: 'application/text'
- });
- done();
- });
+
+describe('resourceGone()', function () {
+
+ it('returns a 410 error statusCode', function (done) {
+
+ expect(Boom.resourceGone().output.statusCode).to.equal(410);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.resourceGone('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('lengthRequired()', function () {
+
+ it('returns a 411 error statusCode', function (done) {
+
+ expect(Boom.lengthRequired().output.statusCode).to.equal(411);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.lengthRequired('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('preconditionFailed()', function () {
+
+ it('returns a 412 error statusCode', function (done) {
+
+ expect(Boom.preconditionFailed().output.statusCode).to.equal(412);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.preconditionFailed('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('entityTooLarge()', function () {
+
+ it('returns a 413 error statusCode', function (done) {
+
+ expect(Boom.entityTooLarge().output.statusCode).to.equal(413);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.entityTooLarge('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('uriTooLong()', function () {
+
+ it('returns a 414 error statusCode', function (done) {
+
+ expect(Boom.uriTooLong().output.statusCode).to.equal(414);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.uriTooLong('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('unsupportedMediaType()', function () {
+
+ it('returns a 415 error statusCode', function (done) {
+
+ expect(Boom.unsupportedMediaType().output.statusCode).to.equal(415);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.unsupportedMediaType('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('rangeNotSatisfiable()', function () {
+
+ it('returns a 416 error statusCode', function (done) {
+
+ expect(Boom.rangeNotSatisfiable().output.statusCode).to.equal(416);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.rangeNotSatisfiable('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('expectationFailed()', function () {
+
+ it('returns a 417 error statusCode', function (done) {
+
+ expect(Boom.expectationFailed().output.statusCode).to.equal(417);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.expectationFailed('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('badData()', function () {
+
+ it('returns a 422 error statusCode', function (done) {
+
+ expect(Boom.badData().output.statusCode).to.equal(422);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.badData('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('tooManyRequests()', function () {
+
+ it('returns a 429 error statusCode', function (done) {
+
+ expect(Boom.tooManyRequests().output.statusCode).to.equal(429);
+ done();
+ });
+
+ it('sets the message with the passed-in message', function (done) {
+
+ expect(Boom.tooManyRequests('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+describe('serverTimeout()', function () {
+
+ it('returns a 503 error statusCode', function (done) {
+
+ expect(Boom.serverTimeout().output.statusCode).to.equal(503);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.serverTimeout('my message').message).to.equal('my message');
+ done();
});
+});
+
+describe('forbidden()', function () {
+
+ it('returns a 403 error statusCode', function (done) {
- describe('#reformat', function () {
+ expect(Boom.forbidden().output.statusCode).to.equal(403);
+ done();
+ });
- it('encodes any HTML markup in the response payload', function (done) {
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.forbidden('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+describe('notFound()', function () {
+
+ it('returns a 404 error statusCode', function (done) {
+
+ expect(Boom.notFound().output.statusCode).to.equal(404);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.notFound('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+describe('internal()', function () {
+
+ it('returns a 500 error statusCode', function (done) {
+
+ expect(Boom.internal().output.statusCode).to.equal(500);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ var err = Boom.internal('my message');
+ expect(err.message).to.equal('my message');
+ expect(err.output.payload.message).to.equal('An internal server error occurred');
+ done();
+ });
+
+ it('passes data on the callback if its passed in', function (done) {
+
+ expect(Boom.internal('my message', { my: 'data' }).data.my).to.equal('data');
+ done();
+ });
- var boom = new Boom(new Error('<script>alert(1)</script>'));
- expect(boom.response.payload.message).to.not.contain('<script>');
+ it('returns an error with composite message', function (done) {
+
+ try {
+ JSON.parse('{');
+ }
+ catch (err) {
+ var boom = Boom.internal('Someting bad', err);
+ expect(boom.message).to.equal('Someting bad: Unexpected end of input');
done();
- });
+ }
+ });
+});
+
+describe('notImplemented()', function () {
+
+ it('returns a 501 error statusCode', function (done) {
+
+ expect(Boom.notImplemented().output.statusCode).to.equal(501);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.notImplemented('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+
+describe('badGateway()', function () {
+
+ it('returns a 502 error statusCode', function (done) {
+
+ expect(Boom.badGateway().output.statusCode).to.equal(502);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.badGateway('my message').message).to.equal('my message');
+ done();
+ });
+});
+
+describe('gatewayTimeout()', function () {
+
+ it('returns a 504 error statusCode', function (done) {
+
+ expect(Boom.gatewayTimeout().output.statusCode).to.equal(504);
+ done();
+ });
+
+ it('sets the message with the passed in message', function (done) {
+
+ expect(Boom.gatewayTimeout('my message').message).to.equal('my message');
+ done();
});
});
+describe('badImplementation()', function () {
+ it('returns a 500 error statusCode', function (done) {
+
+ var err = Boom.badImplementation();
+ expect(err.output.statusCode).to.equal(500);
+ expect(err.isDeveloperError).to.equal(true);
+ done();
+ });
+});
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore
index b3bb517630..77ba16cb05 100644
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore
@@ -1,18 +1,18 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
+
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml
index 40ca59eeeb..047f7e3d5e 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml
@@ -1,5 +1,5 @@
-language: node_js
-
-node_js:
- - 0.10
-
+language: node_js
+
+node_js:
+ - 0.10
+
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE
index e699a7bdba..cda44736af 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2012-2013, Eran Hammer.
+Copyright (c) 2014, Eran Hammer and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -8,17 +8,21 @@ modification, are permitted provided that the following conditions are met:
* 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.
- * Neither the name of Eran Hammer nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
+ * The names of any contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 ERAN HAMMER BE LIABLE FOR ANY
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hueniverse/cryptiles/graphs/contributors
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile
index 9e7138c2a6..3a89298fbd 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile
@@ -1,11 +1,9 @@
test:
- @./node_modules/.bin/lab
+ node node_modules/lab/bin/lab
test-cov:
- @./node_modules/.bin/lab -r threshold -t 100
+ node node_modules/lab/bin/lab -t 100
test-cov-html:
- @./node_modules/.bin/lab -r html -o coverage.html
-complexity:
- @./node_modules/.bin/cr -o complexity.md -f markdown lib
+ node node_modules/lab/bin/lab -r html -o coverage.html
-.PHONY: test test-cov test-cov-html complexity
+.PHONY: test test-cov test-cov-html
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md
index 6a900a4918..be943f8ec8 100644
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md
@@ -3,4 +3,12 @@ cryptiles
General purpose crypto utilities
-[![Build Status](https://secure.travis-ci.org/hueniverse/cryptiles.png)](http://travis-ci.org/hueniverse/cryptiles)
+[![Build Status](https://secure.travis-ci.org/hapijs/cryptiles.png)](http://travis-ci.org/hapijs/cryptiles)
+
+## Methods
+
+### `randomString(<Number> size)`
+Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string.
+
+### `fixedTimeComparison(<String> a, <String> b)`
+Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match). Returns `true` if the strings match, `false` if they differ.
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js
index dcf2bc38ff..f385870ee6 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js
@@ -59,7 +59,7 @@ exports.fixedTimeComparison = function (a, b) {
for (var i = 0, il = a.length; i < il; ++i) {
var ac = a.charCodeAt(i);
var bc = b.charCodeAt(i);
- mismatch += (ac === bc ? 0 : 1);
+ mismatch |= (ac ^ bc);
}
return (mismatch === 0);
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 1248613351..18fee925f1 100755
--- 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
@@ -1,16 +1,16 @@
{
"name": "cryptiles",
"description": "General purpose crypto utilities",
- "version": "0.2.2",
+ "version": "2.0.4",
"author": {
"name": "Eran Hammer",
- "email": "eran@hueniverse.com",
+ "email": "eran@hammer.io",
"url": "http://hueniverse.com"
},
"contributors": [],
"repository": {
"type": "git",
- "url": "git://github.com/hueniverse/cryptiles"
+ "url": "git://github.com/hapijs/cryptiles"
},
"main": "index",
"keywords": [
@@ -22,11 +22,10 @@
"node": ">=0.8.0"
},
"dependencies": {
- "boom": "0.4.x"
+ "boom": "2.x.x"
},
"devDependencies": {
- "lab": "0.1.x",
- "complexity-report": "0.x.x"
+ "lab": "4.x.x"
},
"scripts": {
"test": "make test-cov"
@@ -34,19 +33,18 @@
"licenses": [
{
"type": "BSD",
- "url": "http://github.com/hueniverse/cryptiles/raw/master/LICENSE"
+ "url": "http://github.com/hapijs/cryptiles/raw/master/LICENSE"
}
],
+ "gitHead": "944263dbb628b9b3da542d35600d587f861eeaf0",
"bugs": {
- "url": "https://github.com/hueniverse/cryptiles/issues"
+ "url": "https://github.com/hapijs/cryptiles/issues"
},
- "_id": "cryptiles@0.2.2",
- "dist": {
- "shasum": "ed91ff1f17ad13d3748288594f8a48a0d26f325c",
- "tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz"
- },
- "_from": "cryptiles@>=0.2.0 <0.3.0",
- "_npmVersion": "1.2.24",
+ "homepage": "https://github.com/hapijs/cryptiles",
+ "_id": "cryptiles@2.0.4",
+ "_shasum": "09ea1775b9e1c7de7e60a99d42ab6f08ce1a1285",
+ "_from": "cryptiles@>=2.0.0 <3.0.0",
+ "_npmVersion": "1.4.23",
"_npmUser": {
"name": "hueniverse",
"email": "eran@hueniverse.com"
@@ -57,9 +55,11 @@
"email": "eran@hueniverse.com"
}
],
+ "dist": {
+ "shasum": "09ea1775b9e1c7de7e60a99d42ab6f08ce1a1285",
+ "tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-2.0.4.tgz"
+ },
"directories": {},
- "_shasum": "ed91ff1f17ad13d3748288594f8a48a0d26f325c",
- "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz",
- "readme": "ERROR: No README data found!",
- "homepage": "https://github.com/hueniverse/cryptiles"
+ "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.4.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js
index 58aaa70b31..3340141a2c 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js
@@ -11,11 +11,12 @@ var internals = {};
// Test shortcuts
+var lab = exports.lab = Lab.script();
+var before = lab.before;
+var after = lab.after;
+var describe = lab.experiment;
+var it = lab.test;
var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
describe('Cryptiles', function () {
@@ -95,6 +96,12 @@ describe('Cryptiles', function () {
expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false);
done();
});
+
+ it('should return false when not a string (left)', function (done) {
+
+ expect(Cryptiles.fixedTimeComparison(null, 'x')).to.equal(false);
+ done();
+ });
});
});
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore
index 9966e5e637..7e1574dc5c 100644
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.npmignore
@@ -1,18 +1,18 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
-complexity.md
+.idea
+*.iml
+npm-debug.log
+dump.rdb
+node_modules
+results.tap
+results.xml
+npm-shrinkwrap.json
+config.json
+.DS_Store
+*/.DS_Store
+*/*/.DS_Store
+._*
+*/._*
+*/*/._*
+coverage.*
+lib-cov
+complexity.md
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 40ca59eeeb..047f7e3d5e 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
@@ -1,5 +1,5 @@
-language: node_js
-
-node_js:
- - 0.10
-
+language: node_js
+
+node_js:
+ - 0.10
+
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/CONTRIBUTING.md b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/CONTRIBUTING.md
new file mode 100644
index 0000000000..892836159b
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/CONTRIBUTING.md
@@ -0,0 +1 @@
+Please view our [hapijs contributing guide](https://github.com/hapijs/hapi/blob/master/CONTRIBUTING.md).
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE
index 394adcff2e..5530904255 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE
@@ -1,33 +1,31 @@
-Copyright (c) 2011-2013, Walmart.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * 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.
- * Neither the name of Walmart nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 WALMART 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.
-
-
- * * *
-
-
-Portions of this project were initially based on Postmile, Copyright (c) 2011, Yahoo Inc.
-Postmile is published at https://github.com/yahoo/postmile and its licensing terms are
-published at https://github.com/yahoo/postmile/blob/master/LICENSE.
-
+Copyright (c) 2011-2014, Walmart and other contributors.
+Copyright (c) 2011, Yahoo Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * 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.
+ * The names of any contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hapijs/hapi/graphs/contributors
+Portions of this project were initially based on the Yahoo! Inc. Postmile project,
+published at https://github.com/yahoo/postmile.
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile
index e605d6c049..83aaf0c0c6 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile
@@ -1,10 +1,8 @@
-test:
- @node node_modules/lab/bin/lab
-test-cov:
- @node node_modules/lab/bin/lab -r threshold -t 100
-test-cov-html:
- @node node_modules/lab/bin/lab -r html -o coverage.html
-complexity:
- @node node_modules/complexity-report/src/cli.js -o complexity.md -f markdown lib
-
-.PHONY: test test-cov test-cov-html complexity
+test:
+ @node node_modules/lab/bin/lab -a code
+test-cov:
+ @node node_modules/lab/bin/lab -a code -t 100 -L
+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/hoek/README.md b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/README.md
index ac64e2fda1..a22fa06e97 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
@@ -1,436 +1,543 @@
-<a href="https://github.com/spumko"><img src="https://raw.github.com/spumko/spumko/master/images/from.png" align="right" /></a>
-![hoek Logo](https://raw.github.com/spumko/hoek/master/images/hoek.png)
-
-General purpose node utilities
-
-[![Build Status](https://secure.travis-ci.org/spumko/hoek.png)](http://travis-ci.org/spumko/hoek)
-
-# Table of Contents
-
-* [Introduction](#introduction "Introduction")
-* [Object](#object "Object")
- * [clone](#cloneobj "clone")
- * [merge](#mergetarget-source-isnulloverride-ismergearrays "merge")
- * [applyToDefaults](#applytodefaultsdefaults-options "applyToDefaults")
- * [unique](#uniquearray-key "unique")
- * [mapToObject](#maptoobjectarray-key "mapToObject")
- * [intersect](#intersectarray1-array2 "intersect")
- * [matchKeys](#matchkeysobj-keys "matchKeys")
- * [flatten](#flattenarray-target "flatten")
- * [removeKeys](#removekeysobject-keys "removeKeys")
- * [reach](#reachobj-chain "reach")
- * [inheritAsync](#inheritasyncself-obj-keys "inheritAsync")
- * [rename](#renameobj-from-to "rename")
-* [Timer](#timer "Timer")
-* [Binary Encoding/Decoding](#binary "Binary Encoding/Decoding")
- * [base64urlEncode](#binary64urlEncodevalue "binary64urlEncode")
- * [base64urlDecode](#binary64urlDecodevalue "binary64urlDecode")
-* [Escaping Characters](#escaped "Escaping Characters")
- * [escapeHtml](#escapeHtmlstring "escapeHtml")
- * [escapeHeaderAttribute](#escapeHeaderAttributeattribute "escapeHeaderAttribute")
- * [escapeRegex](#escapeRegexstring "escapeRegex")
-* [Errors](#errors "Errors")
- * [assert](#assertmessage "assert")
- * [abort](#abortmessage "abort")
- * [displayStack](#displayStackslice "displayStack")
- * [callStack](#callStackslice "callStack")
- * [toss](#tosscondition "toss")
-* [Load files](#load-files "Load Files")
- * [loadPackage](#loadPackagedir "loadpackage")
- * [loadDirModules](#loadDirModulespath-excludefiles-target "loaddirmodules")
-
-
-
-# Introduction
-
-The *Hoek* general purpose node utilities library is used to aid in a variety of manners. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more.
-
-For example, to use Hoek to set configuration with default options:
-```javascript
-var Hoek = require('hoek');
-
-var default = {url : "www.github.com", port : "8000", debug : true}
-
-var config = Hoek.applyToDefaults(default, {port : "3000", admin : true});
-
-// In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true }
-```
-
-Under each of the sections (such as Array), there are subsections which correspond to Hoek methods. Each subsection will explain how to use the corresponding method. In each js excerpt below, the var Hoek = require('hoek') is omitted for brevity.
-
-## Object
-
-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).
-
-```javascript
-
-var nestedObj = {
- w: /^something$/ig,
- x: {
- a: [1, 2, 3],
- b: 123456,
- c: new Date()
- },
- y: 'y',
- z: new Date()
- };
-
-var copy = Hoek.clone(nestedObj);
-
-copy.x.b = 100;
-
-console.log(copy.y) // results in 'y'
-console.log(nestedObj.x.b) // results in 123456
-console.log(copy.x.b) // results in 100
-```
-
-### merge(target, source, isNullOverride, isMergeArrays)
-isNullOverride, isMergeArrays default to true
-
-Merge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied
-
-
-```javascript
-
-var target = {a: 1, b : 2}
-var source = {a: 0, c: 5}
-var source2 = {a: null, c: 5}
-
-var targetArray = [1, 2, 3];
-var sourceArray = [4, 5];
-
-var newTarget = Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5}
-newTarget = Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5}
-newTarget = Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5}
-
-newTarget = Hoek.merge(targetArray, sourceArray) // results in [1, 2, 3, 4, 5]
-newTarget = Hoek.merge(targetArray, sourceArray, true, false) // results in [4, 5]
-
-
-
-
-```
-
-### applyToDefaults(defaults, options)
-
-Apply options to a copy of the defaults
-
-```javascript
-
-var defaults = {host: "localhost", port: 8000};
-var options = {port: 8080};
-
-var config = Hoek.applyToDefaults(defaults, options); // results in {host: "localhost", port: 8080};
-
-
-```
-
-### unique(array, key)
-
-Remove duplicate items from Array
-
-```javascript
-
-var array = [1, 2, 2, 3, 3, 4, 5, 6];
-
-var newArray = Hoek.unique(array); // results in [1,2,3,4,5,6];
-
-array = [{id: 1}, {id: 1}, {id: 2}];
-
-newArray = Hoek.unique(array, "id") // results in [{id: 1}, {id: 2}]
-
-```
-
-### mapToObject(array, key)
-
-Convert an Array into an Object
-
-```javascript
-
-var array = [1,2,3];
-var newObject = Hoek.mapToObject(array); // results in [{"1": true}, {"2": true}, {"3": true}]
-
-array = [{id: 1}, {id: 2}];
-newObject = Hoek.mapToObject(array, "id") // results in [{"id": 1}, {"id": 2}]
-
-```
-### intersect(array1, array2)
-
-Find the common unique items in two arrays
-
-```javascript
-
-var array1 = [1, 2, 3];
-var array2 = [1, 4, 5];
-
-var newArray = Hoek.intersect(array1, array2) // results in [1]
-
-```
-
-### matchKeys(obj, keys)
-
-Find which keys are present
-
-```javascript
-
-var obj = {a: 1, b: 2, c: 3};
-var keys = ["a", "e"];
-
-Hoek.matchKeys(obj, keys) // returns ["a"]
-
-```
-
-### flatten(array, target)
-
-Flatten an array
-
-```javascript
-
-var array = [1, 2, 3];
-var target = [4, 5];
-
-var flattenedArray = Hoek.flatten(array, target) // results in [4, 5, 1, 2, 3];
-
-```
-
-### removeKeys(object, keys)
-
-Remove keys
-
-```javascript
-
-var object = {a: 1, b: 2, c: 3, d: 4};
-
-var keys = ["a", "b"];
-
-Hoek.removeKeys(object, keys) // object is now {c: 3, d: 4}
-
-```
-
-### reach(obj, chain)
-
-Converts an object key chain string to reference
-
-```javascript
-
-var chain = 'a.b.c';
-var obj = {a : {b : { c : 1}}};
-
-Hoek.reach(obj, chain) // returns 1
-
-```
-
-### inheritAsync(self, obj, keys)
-
-Inherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors
-
-```javascript
-
-var targetFunc = function () { };
-
-var proto = {
- a: function () {
- return 'a!';
- },
- b: function () {
- return 'b!';
- },
- c: function () {
- throw new Error('c!');
- }
- };
-
-var keys = ['a', 'c'];
-
-Hoek.inheritAsync(targetFunc, proto, ['a', 'c']);
-
-var target = new targetFunc();
-
-target.a(function(err, result){console.log(result)} // returns 'a!'
-
-target.c(function(err, result){console.log(result)} // returns undefined
-
-target.b(function(err, result){console.log(result)} // gives error: Object [object Object] has no method 'b'
-
-```
-
-### rename(obj, from, to)
-
-Rename a key of an object
-
-```javascript
-
-var obj = {a : 1, b : 2};
-
-Hoek.rename(obj, "a", "c"); // obj is now {c : 1, b : 2}
-
-```
-
-
-# Timer
-
-A Timer object. Initializing a new timer object sets the ts to the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
-
-```javascript
-
-
-example :
-
-
-var timerObj = new Hoek.Timer();
-console.log("Time is now: " + timerObj.ts)
-console.log("Elapsed time from initialization: " + timerObj.elapsed() + 'milliseconds')
-
-```
-
-# Binary Encoding/Decoding
-
-### base64urlEncode(value)
-
-Encodes value in Base64 or URL encoding
-
-### base64urlDecode(value)
-
-Decodes data in Base64 or URL encoding.
-# Escaping Characters
-
-Hoek provides convenient methods for escaping html characters. The escaped characters are as followed:
-
-```javascript
-
-internals.htmlEscaped = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&quot;',
- "'": '&#x27;',
- '`': '&#x60;'
-};
-
-```
-
-### escapeHtml(string)
-
-```javascript
-
-var string = '<html> hey </html>';
-var escapedString = Hoek.escapeHtml(string); // returns &lt;html&gt; hey &lt;/html&gt;
-
-```
-
-### escapeHeaderAttribute(attribute)
-
-Escape attribute value for use in HTTP header
-
-```javascript
-
-var a = Hoek.escapeHeaderAttribute('I said "go w\\o me"'); //returns I said \"go w\\o me\"
-
-
-```
-
-
-### escapeRegex(string)
-
-Escape string for Regex construction
-
-```javascript
-
-var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); // returns 4\^f\$s\.4\*5\+\-_\?%\=#\!\:@\|~\\\/`"\(>\)\[<\]d\{\}s\,
-
-
-
-```
-
-# Errors
-
-### assert(message)
-
-```javascript
-
-var a = 1, b =2;
-
-Hoek.assert(a === b, 'a should equal b'); // ABORT: a should equal b
-
-```
-
-### abort(message)
-
-First checks if process.env.NODE_ENV === 'test', and if so, throws error message. Otherwise,
-displays most recent stack and then exits process.
-
-
-
-### displayStack(slice)
-
-Displays the trace stack
-
-```javascript
-
-var stack = Hoek.displayStack();
-console.log(stack) // returns something like:
-
-[ 'null (/Users/user/Desktop/hoek/test.js:4:18)',
- 'Module._compile (module.js:449:26)',
- 'Module._extensions..js (module.js:467:10)',
- 'Module.load (module.js:356:32)',
- 'Module._load (module.js:312:12)',
- 'Module.runMain (module.js:492:10)',
- 'startup.processNextTick.process._tickCallback (node.js:244:9)' ]
-
-```
-
-### callStack(slice)
-
-Returns a trace stack array.
-
-```javascript
-
-var stack = Hoek.callStack();
-console.log(stack) // returns something like:
-
-[ [ '/Users/user/Desktop/hoek/test.js', 4, 18, null, false ],
- [ 'module.js', 449, 26, 'Module._compile', false ],
- [ 'module.js', 467, 10, 'Module._extensions..js', false ],
- [ 'module.js', 356, 32, 'Module.load', false ],
- [ 'module.js', 312, 12, 'Module._load', false ],
- [ 'module.js', 492, 10, 'Module.runMain', false ],
- [ 'node.js',
- 244,
- 9,
- 'startup.processNextTick.process._tickCallback',
- false ] ]
-
-
-```
-
-### toss(condition)
-
-toss(condition /*, [message], callback */)
-
-Return an error as first argument of a callback
-
-
-# Load Files
-
-### loadPackage(dir)
-
-Load and parse package.json process root or given directory
-
-```javascript
-
-var pack = Hoek.loadPackage(); // pack.name === 'hoek'
-
-```
-
-### loadDirModules(path, excludeFiles, target)
-
-Loads modules from a given path; option to exclude files (array).
-
-
-
-
+![hoek Logo](https://raw.github.com/hapijs/hoek/master/images/hoek.png)
+
+Utility methods for the hapi ecosystem. This module is not intended to solve every problem for everyone, but rather as a central place to store hapi-specific methods. If you're looking for a general purpose utility module, check out [lodash](https://github.com/lodash/lodash) or [underscore](https://github.com/jashkenas/underscore).
+
+[![Build Status](https://secure.travis-ci.org/hapijs/hoek.png)](http://travis-ci.org/hapijs/hoek)
+
+Lead Maintainer: [Nathan LaFreniere](https://github.com/nlf)
+
+# Table of Contents
+
+* [Introduction](#introduction "Introduction")
+* [Object](#object "Object")
+ * [clone](#cloneobj "clone")
+ * [cloneWithShallow](#clonewithshallowobj-keys "cloneWithShallow")
+ * [merge](#mergetarget-source-isnulloverride-ismergearrays "merge")
+ * [applyToDefaults](#applytodefaultsdefaults-options "applyToDefaults")
+ * [applyToDefaultsWithShallow](#applytodefaultswithshallowdefaults-options-keys "applyToDefaultsWithShallow")
+ * [deepEqual](#deepequala-b "deepEqual")
+ * [unique](#uniquearray-key "unique")
+ * [mapToObject](#maptoobjectarray-key "mapToObject")
+ * [intersect](#intersectarray1-array2 "intersect")
+ * [contain](#containref-values-options "contain")
+ * [flatten](#flattenarray-target "flatten")
+ * [reach](#reachobj-chain-options "reach")
+ * [transform](#transformobj-transform-options "transform")
+ * [shallow](#shallowobj "shallow")
+ * [stringify](#stringifyobj "stringify")
+* [Timer](#timer "Timer")
+* [Bench](#bench "Bench")
+* [Binary Encoding/Decoding](#binary-encodingdecoding "Binary Encoding/Decoding")
+ * [base64urlEncode](#base64urlencodevalue "binary64urlEncode")
+ * [base64urlDecode](#base64urldecodevalue "binary64urlDecode")
+* [Escaping Characters](#escaping-characters "Escaping Characters")
+ * [escapeHtml](#escapehtmlstring "escapeHtml")
+ * [escapeHeaderAttribute](#escapeheaderattributeattribute "escapeHeaderAttribute")
+ * [escapeRegex](#escaperegexstring "escapeRegex")
+* [Errors](#errors "Errors")
+ * [assert](#assertcondition-message "assert")
+ * [abort](#abortmessage "abort")
+ * [displayStack](#displaystackslice "displayStack")
+ * [callStack](#callstackslice "callStack")
+* [Function](#function "Function")
+ * [nextTick](#nexttickfn "nextTick")
+ * [once](#oncefn "once")
+ * [ignore](#ignore "ignore")
+* [Miscellaneous](#miscellaneous "Miscellaneous")
+ * [uniqueFilename](#uniquefilename "uniqueFilename")
+ * [isInteger](#isInteger "isInteger")
+
+
+
+# Introduction
+
+The *Hoek* library contains some common functions used within the hapi ecosystem. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more.
+
+For example, to use Hoek to set configuration with default options:
+```javascript
+var Hoek = require('hoek');
+
+var default = {url : "www.github.com", port : "8000", debug : true};
+
+var config = Hoek.applyToDefaults(default, {port : "3000", admin : true});
+
+// In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true }
+```
+
+Under each of the sections (such as Array), there are subsections which correspond to Hoek methods. Each subsection will explain how to use the corresponding method. In each js excerpt below, the `var Hoek = require('hoek');` is omitted for brevity.
+
+## Object
+
+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).
+
+```javascript
+
+var nestedObj = {
+ w: /^something$/ig,
+ x: {
+ a: [1, 2, 3],
+ b: 123456,
+ c: new Date()
+ },
+ y: 'y',
+ z: new Date()
+ };
+
+var copy = Hoek.clone(nestedObj);
+
+copy.x.b = 100;
+
+console.log(copy.y); // results in 'y'
+console.log(nestedObj.x.b); // results in 123456
+console.log(copy.x.b); // results in 100
+```
+
+### cloneWithShallow(obj, keys)
+keys is an array of key names to shallow copy
+
+This method is also used to clone an object or array, however any keys listed in the `keys` array are shallow copied while those not listed are deep copied.
+
+```javascript
+
+var nestedObj = {
+ w: /^something$/ig,
+ x: {
+ a: [1, 2, 3],
+ b: 123456,
+ c: new Date()
+ },
+ y: 'y',
+ z: new Date()
+ };
+
+var copy = Hoek.cloneWithShallow(nestedObj, ['x']);
+
+copy.x.b = 100;
+
+console.log(copy.y); // results in 'y'
+console.log(nestedObj.x.b); // results in 100
+console.log(copy.x.b); // results in 100
+```
+
+### merge(target, source, isNullOverride, isMergeArrays)
+isNullOverride, isMergeArrays default to true
+
+Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied.
+Merge is destructive where the target is modified. For non destructive merge, use `applyToDefaults`.
+
+
+```javascript
+
+var target = {a: 1, b : 2};
+var source = {a: 0, c: 5};
+var source2 = {a: null, c: 5};
+
+Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5}
+Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5}
+Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5}
+
+var targetArray = [1, 2, 3];
+var sourceArray = [4, 5];
+
+Hoek.merge(targetArray, sourceArray); // results in [1, 2, 3, 4, 5]
+Hoek.merge(targetArray, sourceArray, true, false); // results in [4, 5]
+```
+
+### applyToDefaults(defaults, options)
+
+Apply options to a copy of the defaults
+
+```javascript
+
+var defaults = { host: "localhost", port: 8000 };
+var options = { port: 8080 };
+
+var config = Hoek.applyToDefaults(defaults, options); // results in { host: "localhost", port: 8080 }
+```
+
+### applyToDefaultsWithShallow(defaults, options, keys)
+keys is an array of key names to shallow copy
+
+Apply options to a copy of the defaults. Keys specified in the last parameter are shallow copied from options instead of merged.
+
+```javascript
+
+var defaults = {
+ server: {
+ host: "localhost",
+ port: 8000
+ },
+ name: 'example'
+ };
+
+var options = { server: { port: 8080 } };
+
+var config = Hoek.applyToDefaults(defaults, options); // results in { server: { port: 8080 }, name: 'example' }
+```
+
+### deepEqual(b, a)
+
+Performs a deep comparison of the two values including support for circular dependencies, prototype, and properties.
+
+```javascript
+Hoek.deepEqual({ a: [1, 2], b: 'string', c: { d: true } }, { a: [1, 2], b: 'string', c: { d: true } });
+```
+
+### unique(array, key)
+
+Remove duplicate items from Array
+
+```javascript
+
+var array = [1, 2, 2, 3, 3, 4, 5, 6];
+
+var newArray = Hoek.unique(array); // results in [1,2,3,4,5,6]
+
+array = [{id: 1}, {id: 1}, {id: 2}];
+
+newArray = Hoek.unique(array, "id"); // results in [{id: 1}, {id: 2}]
+```
+
+### mapToObject(array, key)
+
+Convert an Array into an Object
+
+```javascript
+
+var array = [1,2,3];
+var newObject = Hoek.mapToObject(array); // results in [{"1": true}, {"2": true}, {"3": true}]
+
+array = [{id: 1}, {id: 2}];
+newObject = Hoek.mapToObject(array, "id"); // results in [{"id": 1}, {"id": 2}]
+```
+
+### intersect(array1, array2)
+
+Find the common unique items in two arrays
+
+```javascript
+
+var array1 = [1, 2, 3];
+var array2 = [1, 4, 5];
+
+var newArray = Hoek.intersect(array1, array2); // results in [1]
+```
+
+### contain(ref, values, [options])
+
+Tests if the reference value contains the provided values where:
+- `ref` - the reference string, array, or object.
+- `values` - a single or array of values to find within the `ref` value. If `ref` is an object, `values` can be a key name,
+ an array of key names, or an object with key-value pairs to compare.
+- `options` - an optional object with the following optional settings:
+ - `deep` - if `true`, performed a deep comparison of the values.
+ - `once` - if `true`, allows only one occurrence of each value.
+ - `only` - if `true`, does not allow values not explicitly listed.
+ - `part` - if `true`, allows partial match of the values (at least one must always match).
+
+Note: comparing a string to overlapping values will result in failed comparison (e.g. `contain('abc', ['ab', 'bc'])`).
+Also, if an object key's value does not match the provided value, `false` is returned even when `part` is specified.
+
+```javascript
+Hoek.contain('aaa', 'a', { only: true }); // true
+Hoek.contain([{ a: 1 }], [{ a: 1 }], { deep: true }); // true
+Hoek.contain([1, 2, 2], [1, 2], { once: true }); // false
+Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 4 }, { part: true }); // true
+```
+
+### flatten(array, [target])
+
+Flatten an array
+
+```javascript
+
+var array = [1, [2, 3]];
+
+var flattenedArray = Hoek.flatten(array); // results in [1, 2, 3]
+
+array = [1, [2, 3]];
+target = [4, [5]];
+
+flattenedArray = Hoek.flatten(array, target); // results in [4, [5], 1, 2, 3]
+```
+
+### reach(obj, chain, [options])
+
+Converts an object key chain string to reference
+
+- `options` - optional settings
+ - `separator` - string to split chain path on, defaults to '.'
+ - `default` - value to return if the path or value is not present, default is `undefined`
+ - `strict` - if `true`, will throw an error on missing member, default is `false`
+ - `functions` - if `true` allow traversing functions for properties. `false` will throw an error if a function is part of the chain.
+
+A chain including negative numbers will work like negative indices on an
+array.
+
+```javascript
+
+var chain = 'a.b.c';
+var obj = {a : {b : { c : 1}}};
+
+Hoek.reach(obj, chain); // returns 1
+
+var chain = 'a.b.-1';
+var obj = {a : {b : [2,3,6]}};
+
+Hoek.reach(obj, chain); // returns 6
+```
+
+### transform(obj, transform, [options])
+
+Transforms an existing object into a new one based on the supplied `obj` and `transform` map. `options` are the same as the `reach` options.
+
+```javascript
+var source = {
+ address: {
+ one: '123 main street',
+ two: 'PO Box 1234'
+ },
+ title: 'Warehouse',
+ state: 'CA'
+};
+
+var result = Hoek.transform(source, {
+ 'person.address.lineOne': 'address.one',
+ 'person.address.lineTwo': 'address.two',
+ 'title': 'title',
+ 'person.address.region': 'state'
+});
+// Results in
+// {
+// person: {
+// address: {
+// lineOne: '123 main street',
+// lineTwo: 'PO Box 1234',
+// region: 'CA'
+// }
+// },
+// title: 'Warehouse'
+// }
+```
+
+### shallow(obj)
+
+Performs a shallow copy by copying the references of all the top level children where:
+- `obj` - the object to be copied.
+
+```javascript
+var shallow = Hoek.shallow({ a: { b: 1 } });
+```
+
+### stringify(obj)
+
+Converts an object to string using the built-in `JSON.stringify()` method with the difference that any errors are caught
+and reported back in the form of the returned string. Used as a shortcut for displaying information to the console (e.g. in
+error message) without the need to worry about invalid conversion.
+
+```javascript
+var a = {};
+a.b = a;
+Hoek.stringify(a); // Returns '[Cannot display object: Converting circular structure to JSON]'
+```
+
+# Timer
+
+A Timer object. Initializing a new timer object sets the ts to the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.
+
+```javascript
+
+var timerObj = new Hoek.Timer();
+console.log("Time is now: " + timerObj.ts);
+console.log("Elapsed time from initialization: " + timerObj.elapsed() + 'milliseconds');
+```
+
+
+# Bench
+
+Same as Timer with the exception that `ts` stores the internal node clock which is not related to `Date.now()` and cannot be used to display
+human-readable timestamps. More accurate for benchmarking or internal timers.
+
+# Binary Encoding/Decoding
+
+### base64urlEncode(value)
+
+Encodes value in Base64 or URL encoding
+
+### base64urlDecode(value)
+
+Decodes data in Base64 or URL encoding.
+# Escaping Characters
+
+Hoek provides convenient methods for escaping html characters. The escaped characters are as followed:
+
+```javascript
+
+internals.htmlEscaped = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#x27;',
+ '`': '&#x60;'
+};
+```
+
+### escapeHtml(string)
+
+```javascript
+
+var string = '<html> hey </html>';
+var escapedString = Hoek.escapeHtml(string); // returns &lt;html&gt; hey &lt;/html&gt;
+```
+
+### escapeHeaderAttribute(attribute)
+
+Escape attribute value for use in HTTP header
+
+```javascript
+
+var a = Hoek.escapeHeaderAttribute('I said "go w\\o me"'); //returns I said \"go w\\o me\"
+```
+
+
+### escapeRegex(string)
+
+Escape string for Regex construction
+
+```javascript
+
+var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); // returns 4\^f\$s\.4\*5\+\-_\?%\=#\!\:@\|~\\\/`"\(>\)\[<\]d\{\}s\,
+```
+
+# Errors
+
+### assert(condition, message)
+
+```javascript
+
+var a = 1, b = 2;
+
+Hoek.assert(a === b, 'a should equal b'); // Throws 'a should equal b'
+```
+
+Note that you may also pass an already created Error object as the second parameter, and `assert` will throw that object.
+
+```javascript
+
+var a = 1, b = 2;
+
+Hoek.assert(a === b, new Error('a should equal b')); // Throws the given error object
+```
+
+### abort(message)
+
+First checks if `process.env.NODE_ENV === 'test'`, and if so, throws error message. Otherwise,
+displays most recent stack and then exits process.
+
+
+
+### displayStack(slice)
+
+Displays the trace stack
+
+```javascript
+
+var stack = Hoek.displayStack();
+console.log(stack); // returns something like:
+
+[ 'null (/Users/user/Desktop/hoek/test.js:4:18)',
+ 'Module._compile (module.js:449:26)',
+ 'Module._extensions..js (module.js:467:10)',
+ 'Module.load (module.js:356:32)',
+ 'Module._load (module.js:312:12)',
+ 'Module.runMain (module.js:492:10)',
+ 'startup.processNextTick.process._tickCallback (node.js:244:9)' ]
+```
+
+### callStack(slice)
+
+Returns a trace stack array.
+
+```javascript
+
+var stack = Hoek.callStack();
+console.log(stack); // returns something like:
+
+[ [ '/Users/user/Desktop/hoek/test.js', 4, 18, null, false ],
+ [ 'module.js', 449, 26, 'Module._compile', false ],
+ [ 'module.js', 467, 10, 'Module._extensions..js', false ],
+ [ 'module.js', 356, 32, 'Module.load', false ],
+ [ 'module.js', 312, 12, 'Module._load', false ],
+ [ 'module.js', 492, 10, 'Module.runMain', false ],
+ [ 'node.js',
+ 244,
+ 9,
+ 'startup.processNextTick.process._tickCallback',
+ false ] ]
+```
+
+## Function
+
+### nextTick(fn)
+
+Returns a new function that wraps `fn` in `process.nextTick`.
+
+```javascript
+
+var myFn = function () {
+ console.log('Do this later');
+};
+
+var nextFn = Hoek.nextTick(myFn);
+
+nextFn();
+console.log('Do this first');
+
+// Results in:
+//
+// Do this first
+// Do this later
+```
+
+### once(fn)
+
+Returns a new function that can be run multiple times, but makes sure `fn` is only run once.
+
+```javascript
+
+var myFn = function () {
+ console.log('Ran myFn');
+};
+
+var onceFn = Hoek.once(myFn);
+onceFn(); // results in "Ran myFn"
+onceFn(); // results in undefined
+```
+
+### ignore
+
+A simple no-op function. It does nothing at all.
+
+## Miscellaneous
+
+### uniqueFilename(path, extension)
+`path` to prepend with the randomly generated file name. `extension` is the optional file extension, defaults to `''`.
+
+Returns a randomly generated file name at the specified `path`. The result is a fully resolved path to a file.
+
+```javascript
+var result = Hoek.uniqueFilename('./test/modules', 'txt'); // results in "full/path/test/modules/{random}.txt"
+```
+
+### isInteger(value)
+
+Check `value` to see if it is an integer. Returns true/false.
+
+```javascript
+var result = Hoek.isInteger('23')
+```
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/index.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/index.js
index 4cc88b3587..bb0a047c4f 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/index.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/index.js
@@ -1 +1 @@
-module.exports = require('./lib'); \ No newline at end of file
+module.exports = require('./lib');
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js
index 666b3dc820..9ecde6666b 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js
@@ -1,132 +1,132 @@
-// Declare internals
-
-var internals = {};
-
-
-exports.escapeJavaScript = function (input) {
-
- if (!input) {
- return '';
- }
-
- var escaped = '';
-
- for (var i = 0, il = input.length; i < il; ++i) {
-
- var charCode = input.charCodeAt(i);
-
- if (internals.isSafe(charCode)) {
- escaped += input[i];
- }
- else {
- escaped += internals.escapeJavaScriptChar(charCode);
- }
- }
-
- return escaped;
-};
-
-
-exports.escapeHtml = function (input) {
-
- if (!input) {
- return '';
- }
-
- var escaped = '';
-
- for (var i = 0, il = input.length; i < il; ++i) {
-
- var charCode = input.charCodeAt(i);
-
- if (internals.isSafe(charCode)) {
- escaped += input[i];
- }
- else {
- escaped += internals.escapeHtmlChar(charCode);
- }
- }
-
- return escaped;
-};
-
-
-internals.escapeJavaScriptChar = function (charCode) {
-
- if (charCode >= 256) {
- return '\\u' + internals.padLeft('' + charCode, 4);
- }
-
- var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
- return '\\x' + internals.padLeft(hexValue, 2);
-};
-
-
-internals.escapeHtmlChar = function (charCode) {
-
- var namedEscape = internals.namedHtml[charCode];
- if (typeof namedEscape !== 'undefined') {
- return namedEscape;
- }
-
- if (charCode >= 256) {
- return '&#' + charCode + ';';
- }
-
- var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
- return '&#x' + internals.padLeft(hexValue, 2) + ';';
-};
-
-
-internals.padLeft = function (str, len) {
-
- while (str.length < len) {
- str = '0' + str;
- }
-
- return str;
-};
-
-
-internals.isSafe = function (charCode) {
-
- return (typeof internals.safeCharCodes[charCode] !== 'undefined');
-};
-
-
-internals.namedHtml = {
- '38': '&amp;',
- '60': '&lt;',
- '62': '&gt;',
- '34': '&quot;',
- '160': '&nbsp;',
- '162': '&cent;',
- '163': '&pound;',
- '164': '&curren;',
- '169': '&copy;',
- '174': '&reg;'
-};
-
-
-internals.safeCharCodes = (function () {
-
- var safe = {};
-
- for (var i = 32; i < 123; ++i) {
-
- if ((i >= 97 && i <= 122) || // a-z
- (i >= 65 && i <= 90) || // A-Z
- (i >= 48 && i <= 57) || // 0-9
- i === 32 || // space
- i === 46 || // .
- i === 44 || // ,
- i === 45 || // -
- i === 58 || // :
- i === 95) { // _
-
- safe[i] = null;
- }
- }
-
- return safe;
-}()); \ No newline at end of file
+// Declare internals
+
+var internals = {};
+
+
+exports.escapeJavaScript = function (input) {
+
+ if (!input) {
+ return '';
+ }
+
+ var escaped = '';
+
+ for (var i = 0, il = input.length; i < il; ++i) {
+
+ var charCode = input.charCodeAt(i);
+
+ if (internals.isSafe(charCode)) {
+ escaped += input[i];
+ }
+ else {
+ escaped += internals.escapeJavaScriptChar(charCode);
+ }
+ }
+
+ return escaped;
+};
+
+
+exports.escapeHtml = function (input) {
+
+ if (!input) {
+ return '';
+ }
+
+ var escaped = '';
+
+ for (var i = 0, il = input.length; i < il; ++i) {
+
+ var charCode = input.charCodeAt(i);
+
+ if (internals.isSafe(charCode)) {
+ escaped += input[i];
+ }
+ else {
+ escaped += internals.escapeHtmlChar(charCode);
+ }
+ }
+
+ return escaped;
+};
+
+
+internals.escapeJavaScriptChar = function (charCode) {
+
+ if (charCode >= 256) {
+ return '\\u' + internals.padLeft('' + charCode, 4);
+ }
+
+ var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
+ return '\\x' + internals.padLeft(hexValue, 2);
+};
+
+
+internals.escapeHtmlChar = function (charCode) {
+
+ var namedEscape = internals.namedHtml[charCode];
+ if (typeof namedEscape !== 'undefined') {
+ return namedEscape;
+ }
+
+ if (charCode >= 256) {
+ return '&#' + charCode + ';';
+ }
+
+ var hexValue = new Buffer(String.fromCharCode(charCode), 'ascii').toString('hex');
+ return '&#x' + internals.padLeft(hexValue, 2) + ';';
+};
+
+
+internals.padLeft = function (str, len) {
+
+ while (str.length < len) {
+ str = '0' + str;
+ }
+
+ return str;
+};
+
+
+internals.isSafe = function (charCode) {
+
+ return (typeof internals.safeCharCodes[charCode] !== 'undefined');
+};
+
+
+internals.namedHtml = {
+ '38': '&amp;',
+ '60': '&lt;',
+ '62': '&gt;',
+ '34': '&quot;',
+ '160': '&nbsp;',
+ '162': '&cent;',
+ '163': '&pound;',
+ '164': '&curren;',
+ '169': '&copy;',
+ '174': '&reg;'
+};
+
+
+internals.safeCharCodes = (function () {
+
+ var safe = {};
+
+ for (var i = 32; i < 123; ++i) {
+
+ if ((i >= 97) || // a-z
+ (i >= 65 && i <= 90) || // A-Z
+ (i >= 48 && i <= 57) || // 0-9
+ i === 32 || // space
+ i === 46 || // .
+ i === 44 || // ,
+ i === 45 || // -
+ i === 58 || // :
+ i === 95) { // _
+
+ safe[i] = null;
+ }
+ }
+
+ return safe;
+}());
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 806260d25e..9afabcddb3 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
@@ -1,585 +1,927 @@
-// Load modules
-
-var Fs = require('fs');
-var Escape = require('./escape');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Clone object or array
-
-exports.clone = function (obj, seen) {
-
- if (typeof obj !== 'object' ||
- obj === null) {
-
- return obj;
- }
-
- seen = seen || { orig: [], copy: [] };
-
- var lookup = seen.orig.indexOf(obj);
- if (lookup !== -1) {
- return seen.copy[lookup];
- }
-
- var newObj = (obj instanceof Array) ? [] : {};
-
- seen.orig.push(obj);
- seen.copy.push(newObj);
-
- for (var i in obj) {
- if (obj.hasOwnProperty(i)) {
- if (obj[i] instanceof Buffer) {
- newObj[i] = new Buffer(obj[i]);
- }
- else if (obj[i] instanceof Date) {
- newObj[i] = new Date(obj[i].getTime());
- }
- else if (obj[i] instanceof RegExp) {
- var flags = '' + (obj[i].global ? 'g' : '') + (obj[i].ignoreCase ? 'i' : '') + (obj[i].multiline ? 'm' : '');
- newObj[i] = new RegExp(obj[i].source, flags);
- }
- else {
- newObj[i] = exports.clone(obj[i], seen);
- }
- }
- }
-
- return newObj;
-};
-
-
-// Merge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied
-
-exports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) {
-
- 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');
-
- if (!source) {
- return target;
- }
-
- if (source instanceof Array) {
- exports.assert(target instanceof Array, 'Cannot merge array onto an object');
- if (isMergeArrays === false) { // isMergeArrays defaults to true
- target.length = 0; // Must not change target assignment
- }
-
- for (var i = 0, il = source.length; i < il; ++i) {
- target.push(source[i]);
- }
-
- return target;
- }
-
- var keys = Object.keys(source);
- for (var k = 0, kl = keys.length; k < kl; ++k) {
- var key = keys[k];
- var value = source[key];
- if (value &&
- typeof value === 'object') {
-
- if (!target[key] ||
- typeof target[key] !== 'object') {
-
- target[key] = exports.clone(value);
- }
- else {
- exports.merge(target[key], source[key], isNullOverride, isMergeArrays);
- }
- }
- else {
- if (value !== null && value !== undefined) { // Explicit to preserve empty strings
- target[key] = value;
- }
- else if (isNullOverride !== false) { // Defaults to true
- target[key] = value;
- }
- }
- }
-
- return target;
-};
-
-
-// Apply options to a copy of the defaults
-
-exports.applyToDefaults = function (defaults, options) {
-
- exports.assert(defaults && typeof defaults == 'object', 'Invalid defaults value: must be an object');
- exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object');
-
- if (!options) { // If no options, return null
- return null;
- }
-
- var copy = exports.clone(defaults);
-
- if (options === true) { // If options is set to true, use defaults
- return copy;
- }
-
- return exports.merge(copy, options, false, false);
-};
-
-
-// Remove duplicate items from array
-
-exports.unique = function (array, key) {
-
- var index = {};
- var result = [];
-
- for (var i = 0, il = array.length; i < il; ++i) {
- var id = (key ? array[i][key] : array[i]);
- if (index[id] !== true) {
-
- result.push(array[i]);
- index[id] = true;
- }
- }
-
- return result;
-};
-
-
-// Convert array into object
-
-exports.mapToObject = function (array, key) {
-
- if (!array) {
- return null;
- }
-
- var obj = {};
- for (var i = 0, il = array.length; i < il; ++i) {
- if (key) {
- if (array[i][key]) {
- obj[array[i][key]] = true;
- }
- }
- else {
- obj[array[i]] = true;
- }
- }
-
- return obj;
-};
-
-
-// Find the common unique items in two arrays
-
-exports.intersect = function (array1, array2, justFirst) {
-
- if (!array1 || !array2) {
- return [];
- }
-
- var common = [];
- var hash = (array1 instanceof Array ? exports.mapToObject(array1) : array1);
- var found = {};
- for (var i = 0, il = array2.length; i < il; ++i) {
- if (hash[array2[i]] && !found[array2[i]]) {
- if (justFirst) {
- return array2[i];
- }
-
- common.push(array2[i]);
- found[array2[i]] = true;
- }
- }
-
- return (justFirst ? null : common);
-};
-
-
-// Find which keys are present
-
-exports.matchKeys = function (obj, keys) {
-
- var matched = [];
- for (var i = 0, il = keys.length; i < il; ++i) {
- if (obj.hasOwnProperty(keys[i])) {
- matched.push(keys[i]);
- }
- }
- return matched;
-};
-
-
-// Flatten array
-
-exports.flatten = function (array, target) {
-
- var result = target || [];
-
- for (var i = 0, il = array.length; i < il; ++i) {
- if (Array.isArray(array[i])) {
- exports.flatten(array[i], result);
- }
- else {
- result.push(array[i]);
- }
- }
-
- return result;
-};
-
-
-// Remove keys
-
-exports.removeKeys = function (object, keys) {
-
- for (var i = 0, il = keys.length; i < il; i++) {
- delete object[keys[i]];
- }
-};
-
-
-// Convert an object key chain string ('a.b.c') to reference (object[a][b][c])
-
-exports.reach = function (obj, chain) {
-
- var path = chain.split('.');
- var ref = obj;
- for (var i = 0, il = path.length; i < il; ++i) {
- if (ref) {
- ref = ref[path[i]];
- }
- }
-
- return ref;
-};
-
-
-// Inherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors
-
-exports.inheritAsync = function (self, obj, keys) {
-
- keys = keys || null;
-
- for (var i in obj) {
- if (obj.hasOwnProperty(i)) {
- if (keys instanceof Array &&
- keys.indexOf(i) < 0) {
-
- continue;
- }
-
- self.prototype[i] = (function (fn) {
-
- return function (next) {
-
- var result = null;
- try {
- result = fn();
- }
- catch (err) {
- return next(err);
- }
-
- return next(null, result);
- };
- })(obj[i]);
- }
- }
-};
-
-
-exports.formatStack = function (stack) {
-
- var trace = [];
- for (var i = 0, il = stack.length; i < il; ++i) {
- var item = stack[i];
- trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]);
- }
-
- return trace;
-};
-
-
-exports.formatTrace = function (trace) {
-
- var display = [];
-
- for (var i = 0, il = trace.length; i < il; ++i) {
- var row = trace[i];
- display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')');
- }
-
- return display;
-};
-
-
-exports.callStack = function (slice) {
-
- // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
-
- var v8 = Error.prepareStackTrace;
- Error.prepareStackTrace = function (err, stack) {
-
- return stack;
- };
-
- var capture = {};
- Error.captureStackTrace(capture, arguments.callee);
- var stack = capture.stack;
-
- Error.prepareStackTrace = v8;
-
- var trace = exports.formatStack(stack);
-
- if (slice) {
- return trace.slice(slice);
- }
-
- return trace;
-};
-
-
-exports.displayStack = function (slice) {
-
- var trace = exports.callStack(slice === undefined ? 1 : slice + 1);
-
- return exports.formatTrace(trace);
-};
-
-
-exports.abortThrow = false;
-
-
-exports.abort = function (message, hideStack) {
-
- if (process.env.NODE_ENV === 'test' || exports.abortThrow === true) {
- throw new Error(message || 'Unknown error');
- }
-
- var stack = '';
- if (!hideStack) {
- stack = exports.displayStack(1).join('\n\t');
- }
- console.log('ABORT: ' + message + '\n\t' + stack);
- process.exit(1);
-};
-
-
-exports.assert = function (condition /*, msg1, msg2, msg3 */) {
-
- if (condition) {
- return;
- }
-
- var msgs = Array.prototype.slice.call(arguments, 1);
- msgs = msgs.map(function (msg) {
-
- return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : JSON.stringify(msg);
- });
- throw new Error(msgs.join(' ') || 'Unknown error');
-};
-
-
-exports.loadDirModules = function (path, excludeFiles, target) { // target(filename, name, capName)
-
- var exclude = {};
- for (var i = 0, il = excludeFiles.length; i < il; ++i) {
- exclude[excludeFiles[i] + '.js'] = true;
- }
-
- var files = Fs.readdirSync(path);
- for (i = 0, il = files.length; i < il; ++i) {
- var filename = files[i];
- if (/\.js$/.test(filename) &&
- !exclude[filename]) {
-
- var name = filename.substr(0, filename.lastIndexOf('.'));
- var capName = name.charAt(0).toUpperCase() + name.substr(1).toLowerCase();
-
- if (typeof target !== 'function') {
- target[capName] = require(path + '/' + name);
- }
- else {
- target(path + '/' + name, name, capName);
- }
- }
- }
-};
-
-
-exports.rename = function (obj, from, to) {
-
- obj[to] = obj[from];
- delete obj[from];
-};
-
-
-exports.Timer = function () {
-
- this.reset();
-};
-
-
-exports.Timer.prototype.reset = function () {
-
- this.ts = Date.now();
-};
-
-
-exports.Timer.prototype.elapsed = function () {
-
- return Date.now() - this.ts;
-};
-
-
-// Load and parse package.json process root or given directory
-
-exports.loadPackage = function (dir) {
-
- var result = {};
- var filepath = (dir || process.env.PWD) + '/package.json';
- if (Fs.existsSync(filepath)) {
- try {
- result = JSON.parse(Fs.readFileSync(filepath));
- }
- catch (e) { }
- }
-
- return result;
-};
-
-
-// Escape string for Regex construction
-
-exports.escapeRegex = function (string) {
-
- // Escape ^$.*+-?=!:|\/()[]{},
- return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&');
-};
-
-
-// Return an error as first argument of a callback
-
-exports.toss = function (condition /*, [message], next */) {
-
- var message = (arguments.length === 3 ? arguments[1] : '');
- var next = (arguments.length === 3 ? arguments[2] : arguments[1]);
-
- var err = (message instanceof Error ? message : (message ? new Error(message) : (condition instanceof Error ? condition : new Error())));
-
- if (condition instanceof Error ||
- !condition) {
-
- return next(err);
- }
-};
-
-
-// Base64url (RFC 4648) encode
-
-exports.base64urlEncode = function (value) {
-
- return (new Buffer(value, 'binary')).toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
-};
-
-
-// Base64url (RFC 4648) decode
-
-exports.base64urlDecode = function (encoded) {
-
- if (encoded &&
- !encoded.match(/^[\w\-]*$/)) {
-
- return new Error('Invalid character');
- }
-
- try {
- return (new Buffer(encoded.replace(/-/g, '+').replace(/:/g, '/'), 'base64')).toString('binary');
- }
- catch (err) {
- return err;
- }
-};
-
-
-// Escape attribute value for use in HTTP header
-
-exports.escapeHeaderAttribute = function (attribute) {
-
- // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \, "
-
- exports.assert(attribute.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/), 'Bad attribute value (' + attribute + ')');
-
- return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); // Escape quotes and slash
-};
-
-
-exports.escapeHtml = function (string) {
-
- return Escape.escapeHtml(string);
-};
-
-
-exports.escapeJavaScript = function (string) {
-
- return Escape.escapeJavaScript(string);
-};
-
-
-/*
-var event = {
- timestamp: now.getTime(),
- tags: ['tag'],
- data: { some: 'data' }
-};
-*/
-
-exports.consoleFunc = console.log;
-
-exports.printEvent = function (event) {
-
- var pad = function (value) {
-
- return (value < 10 ? '0' : '') + value;
- };
-
- var now = new Date(event.timestamp);
- var timestring = (now.getYear() - 100).toString() +
- pad(now.getMonth() + 1) +
- pad(now.getDate()) +
- '/' +
- pad(now.getHours()) +
- pad(now.getMinutes()) +
- pad(now.getSeconds()) +
- '.' +
- now.getMilliseconds();
-
- var data = event.data;
- if (typeof event.data !== 'string') {
- try {
- data = JSON.stringify(event.data);
- }
- catch (e) {
- data = 'JSON Error: ' + e.message;
- }
- }
-
- var output = timestring + ', ' + event.tags[0] + ', ' + data;
- exports.consoleFunc(output);
-};
-
-
-exports.nextTick = function (callback) {
-
- return function () {
-
- var args = arguments;
- process.nextTick(function () {
-
- callback.apply(null, args);
- });
- };
-};
+// Load modules
+
+var Crypto = require('crypto');
+var Path = require('path');
+var Util = require('util');
+var Escape = require('./escape');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Clone object or array
+
+exports.clone = function (obj, seen) {
+
+ if (typeof obj !== 'object' ||
+ obj === null) {
+
+ return obj;
+ }
+
+ seen = seen || { orig: [], copy: [] };
+
+ var lookup = seen.orig.indexOf(obj);
+ if (lookup !== -1) {
+ return seen.copy[lookup];
+ }
+
+ var newObj;
+ var cloneDeep = false;
+
+ if (!Array.isArray(obj)) {
+ if (Buffer.isBuffer(obj)) {
+ newObj = new Buffer(obj);
+ }
+ else if (obj instanceof Date) {
+ newObj = new Date(obj.getTime());
+ }
+ else if (obj instanceof RegExp) {
+ newObj = new RegExp(obj);
+ }
+ else {
+ var proto = Object.getPrototypeOf(obj);
+ if (!proto || proto.isImmutable) {
+ newObj = obj;
+ }
+ else {
+ newObj = Object.create(proto);
+ cloneDeep = true;
+ }
+ }
+ }
+ else {
+ newObj = [];
+ cloneDeep = true;
+ }
+
+ seen.orig.push(obj);
+ 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) {
+
+ Object.defineProperty(newObj, i, descriptor);
+ }
+ else {
+ newObj[i] = exports.clone(obj[i], seen);
+ }
+ }
+ }
+ }
+
+ return newObj;
+};
+
+
+// Merge all the properties of source into target, source wins in conflict, and by default null and undefined from source are applied
+
+exports.merge = function (target, source, isNullOverride /* = true */, isMergeArrays /* = true */) {
+
+ 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');
+
+ if (!source) {
+ return target;
+ }
+
+ if (Array.isArray(source)) {
+ exports.assert(Array.isArray(target), 'Cannot merge array onto an object');
+ if (isMergeArrays === false) { // isMergeArrays defaults to true
+ target.length = 0; // Must not change target assignment
+ }
+
+ for (var i = 0, il = source.length; i < il; ++i) {
+ target.push(exports.clone(source[i]));
+ }
+
+ return target;
+ }
+
+ var keys = Object.keys(source);
+ for (var k = 0, kl = keys.length; k < kl; ++k) {
+ var key = keys[k];
+ var value = source[key];
+ if (value &&
+ typeof value === 'object') {
+
+ if (!target[key] ||
+ typeof target[key] !== 'object' ||
+ (Array.isArray(target[key]) ^ Array.isArray(value)) ||
+ value instanceof Date ||
+ Buffer.isBuffer(value) ||
+ value instanceof RegExp) {
+
+ target[key] = exports.clone(value);
+ }
+ else {
+ exports.merge(target[key], value, isNullOverride, isMergeArrays);
+ }
+ }
+ else {
+ if (value !== null &&
+ value !== undefined) { // Explicit to preserve empty strings
+
+ target[key] = value;
+ }
+ else if (isNullOverride !== false) { // Defaults to true
+ target[key] = value;
+ }
+ }
+ }
+
+ return target;
+};
+
+
+// Apply options to a copy of the defaults
+
+exports.applyToDefaults = function (defaults, options) {
+
+ exports.assert(defaults && typeof defaults === 'object', 'Invalid defaults value: must be an object');
+ exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object');
+
+ if (!options) { // If no options, return null
+ return null;
+ }
+
+ var copy = exports.clone(defaults);
+
+ if (options === true) { // If options is set to true, use defaults
+ return copy;
+ }
+
+ return exports.merge(copy, options, false, false);
+};
+
+
+// Clone an object except for the listed keys which are shallow copied
+
+exports.cloneWithShallow = function (source, keys) {
+
+ if (!source ||
+ typeof source !== 'object') {
+
+ return source;
+ }
+
+ var storage = internals.store(source, keys); // Move shallow copy items to storage
+ var copy = exports.clone(source); // Deep copy the rest
+ internals.restore(copy, source, storage); // Shallow copy the stored items and restore
+ return copy;
+};
+
+
+internals.store = function (source, keys) {
+
+ var storage = {};
+ for (var i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ var value = exports.reach(source, key);
+ if (value !== undefined) {
+ storage[key] = value;
+ internals.reachSet(source, key, undefined);
+ }
+ }
+
+ return storage;
+};
+
+
+internals.restore = function (copy, source, storage) {
+
+ var keys = Object.keys(storage);
+ for (var i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ internals.reachSet(copy, key, storage[key]);
+ internals.reachSet(source, key, storage[key]);
+ }
+};
+
+
+internals.reachSet = function (obj, key, value) {
+
+ var path = key.split('.');
+ var ref = obj;
+ for (var i = 0, il = path.length; i < il; ++i) {
+ var segment = path[i];
+ if (i + 1 === il) {
+ ref[segment] = value;
+ }
+
+ ref = ref[segment];
+ }
+};
+
+
+// Apply options to defaults except for the listed keys which are shallow copied from option without merging
+
+exports.applyToDefaultsWithShallow = function (defaults, options, keys) {
+
+ exports.assert(defaults && typeof defaults === 'object', 'Invalid defaults value: must be an object');
+ exports.assert(!options || options === true || typeof options === 'object', 'Invalid options value: must be true, falsy or an object');
+ exports.assert(keys && Array.isArray(keys), 'Invalid keys');
+
+ if (!options) { // If no options, return null
+ return null;
+ }
+
+ var copy = exports.cloneWithShallow(defaults, keys);
+
+ if (options === true) { // If options is set to true, use defaults
+ return copy;
+ }
+
+ var storage = internals.store(options, keys); // Move shallow copy items to storage
+ exports.merge(copy, options, false, false); // Deep copy the rest
+ internals.restore(copy, options, storage); // Shallow copy the stored items and restore
+ return copy;
+};
+
+
+// Deep object or array comparison
+
+exports.deepEqual = function (obj, ref, seen) {
+
+ var type = typeof obj;
+ if (type !== typeof ref) {
+ return false;
+ }
+
+ if (type !== 'object' ||
+ obj === null ||
+ ref === null) {
+
+ if (obj === ref) { // Copied from Deep-eql, copyright(c) 2013 Jake Luer, jake@alogicalparadox.com, MIT Licensed, https://github.com/chaijs/deep-eql
+ return obj !== 0 || 1 / obj === 1 / ref; // -0 / +0
+ }
+
+ return obj !== obj && ref !== ref; // NaN
+ }
+
+ seen = seen || [];
+ if (seen.indexOf(obj) !== -1) {
+ return true; // If previous comparison failed, it would have stopped execution
+ }
+
+ seen.push(obj);
+
+ if (Array.isArray(obj)) {
+ if (!Array.isArray(ref)) {
+ return false;
+ }
+
+ if (obj.length !== ref.length) {
+ return false;
+ }
+
+ for (var i = 0, il = obj.length; i < il; ++i) {
+ if (!exports.deepEqual(obj[i], ref[i])) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ if (Buffer.isBuffer(obj)) {
+ if (!Buffer.isBuffer(ref)) {
+ return false;
+ }
+
+ if (obj.length !== ref.length) {
+ return false;
+ }
+
+ for (var j = 0, jl = obj.length; j < jl; ++j) {
+ if (obj[j] !== ref[j]) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ if (obj instanceof Date) {
+ return (ref instanceof Date && obj.getTime() === ref.getTime());
+ }
+
+ if (obj instanceof RegExp) {
+ return (ref instanceof RegExp && obj.toString() === ref.toString());
+ }
+
+ if (Object.getPrototypeOf(obj) !== Object.getPrototypeOf(ref)) {
+ 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)) {
+ return false;
+ }
+ }
+ else if (!exports.deepEqual(obj[key], ref[key], seen)) {
+ return false;
+ }
+ }
+
+ return true;
+};
+
+
+// Remove duplicate items from array
+
+exports.unique = function (array, key) {
+
+ var index = {};
+ var result = [];
+
+ for (var i = 0, il = array.length; i < il; ++i) {
+ var id = (key ? array[i][key] : array[i]);
+ if (index[id] !== true) {
+
+ result.push(array[i]);
+ index[id] = true;
+ }
+ }
+
+ return result;
+};
+
+
+// Convert array into object
+
+exports.mapToObject = function (array, key) {
+
+ if (!array) {
+ return null;
+ }
+
+ var obj = {};
+ for (var i = 0, il = array.length; i < il; ++i) {
+ if (key) {
+ if (array[i][key]) {
+ obj[array[i][key]] = true;
+ }
+ }
+ else {
+ obj[array[i]] = true;
+ }
+ }
+
+ return obj;
+};
+
+
+// Find the common unique items in two arrays
+
+exports.intersect = function (array1, array2, justFirst) {
+
+ if (!array1 || !array2) {
+ return [];
+ }
+
+ var common = [];
+ var hash = (Array.isArray(array1) ? exports.mapToObject(array1) : array1);
+ var found = {};
+ for (var i = 0, il = array2.length; i < il; ++i) {
+ if (hash[array2[i]] && !found[array2[i]]) {
+ if (justFirst) {
+ return array2[i];
+ }
+
+ common.push(array2[i]);
+ found[array2[i]] = true;
+ }
+ }
+
+ return (justFirst ? null : common);
+};
+
+
+// Test if the reference contains the values
+
+exports.contain = function (ref, values, options) {
+
+ /*
+ string -> string(s)
+ array -> item(s)
+ object -> key(s)
+ object -> object (key:value)
+ */
+
+ var valuePairs = null;
+ if (typeof ref === 'object' &&
+ typeof values === 'object' &&
+ !Array.isArray(ref) &&
+ !Array.isArray(values)) {
+
+ valuePairs = values;
+ values = Object.keys(values);
+ }
+ else {
+ values = [].concat(values);
+ }
+
+ options = options || {}; // deep, once, only, part
+
+ exports.assert(arguments.length >= 2, 'Insufficient arguments');
+ exports.assert(typeof ref === 'string' || typeof ref === 'object', 'Reference must be string or an object');
+ exports.assert(values.length, 'Values array cannot be empty');
+
+ var compare = options.deep ? exports.deepEqual : function (a, b) { return a === b; };
+
+ var misses = false;
+ var matches = new Array(values.length);
+ for (var i = 0, il = matches.length; i < il; ++i) {
+ matches[i] = 0;
+ }
+
+ if (typeof ref === 'string') {
+ var pattern = '(';
+ for (i = 0, il = values.length; i < il; ++i) {
+ var value = values[i];
+ exports.assert(typeof value === 'string', 'Cannot compare string reference to non-string value');
+ pattern += (i ? '|' : '') + exports.escapeRegex(value);
+ }
+
+ var regex = new RegExp(pattern + ')', 'g');
+ var leftovers = ref.replace(regex, function ($0, $1) {
+
+ var index = values.indexOf($1);
+ ++matches[index];
+ return ''; // Remove from string
+ });
+
+ misses = !!leftovers;
+ }
+ else if (Array.isArray(ref)) {
+ for (i = 0, il = ref.length; i < il; ++i) {
+ for (var j = 0, jl = values.length, matched = false; j < jl && matched === false; ++j) {
+ matched = compare(ref[i], values[j]) && j;
+ }
+
+ if (matched !== false) {
+ ++matches[matched];
+ }
+ else {
+ misses = true;
+ }
+ }
+ }
+ else {
+ var keys = Object.keys(ref);
+ for (i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ var pos = values.indexOf(key);
+ if (pos !== -1) {
+ if (valuePairs &&
+ !compare(ref[key], valuePairs[key])) {
+
+ return false;
+ }
+
+ ++matches[pos];
+ }
+ else {
+ misses = true;
+ }
+ }
+ }
+
+ var result = false;
+ for (i = 0, il = matches.length; i < il; ++i) {
+ result = result || !!matches[i];
+ if ((options.once && matches[i] > 1) ||
+ (!options.part && !matches[i])) {
+
+ return false;
+ }
+ }
+
+ if (options.only &&
+ misses) {
+
+ return false;
+ }
+
+ return result;
+};
+
+
+// Flatten array
+
+exports.flatten = function (array, target) {
+
+ var result = target || [];
+
+ for (var i = 0, il = array.length; i < il; ++i) {
+ if (Array.isArray(array[i])) {
+ exports.flatten(array[i], result);
+ }
+ else {
+ result.push(array[i]);
+ }
+ }
+
+ return result;
+};
+
+
+// Convert an object key chain string ('a.b.c') to reference (object[a][b][c])
+
+exports.reach = function (obj, chain, options) {
+
+ options = options || {};
+ if (typeof options === 'string') {
+ options = { separator: options };
+ }
+
+ var path = chain.split(options.separator || '.');
+ var ref = obj;
+ for (var i = 0, il = path.length; i < il; ++i) {
+ var key = path[i];
+ if (key[0] === '-' && Array.isArray(ref)) {
+ key = key.slice(1, key.length);
+ key = ref.length - key;
+ }
+
+ if (!ref ||
+ !ref.hasOwnProperty(key) ||
+ (typeof ref !== 'object' && options.functions === false)) { // Only object and function can have properties
+
+ exports.assert(!options.strict || i + 1 === il, 'Missing segment', key, 'in reach path ', chain);
+ exports.assert(typeof ref === 'object' || options.functions === true || typeof ref !== 'function', 'Invalid segment', key, 'in reach path ', chain);
+ ref = options.default;
+ break;
+ }
+
+ ref = ref[key];
+ }
+
+ return ref;
+};
+
+
+exports.formatStack = function (stack) {
+
+ var trace = [];
+ for (var i = 0, il = stack.length; i < il; ++i) {
+ var item = stack[i];
+ trace.push([item.getFileName(), item.getLineNumber(), item.getColumnNumber(), item.getFunctionName(), item.isConstructor()]);
+ }
+
+ return trace;
+};
+
+
+exports.formatTrace = function (trace) {
+
+ var display = [];
+
+ for (var i = 0, il = trace.length; i < il; ++i) {
+ var row = trace[i];
+ display.push((row[4] ? 'new ' : '') + row[3] + ' (' + row[0] + ':' + row[1] + ':' + row[2] + ')');
+ }
+
+ return display;
+};
+
+
+exports.callStack = function (slice) {
+
+ // http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
+
+ var v8 = Error.prepareStackTrace;
+ Error.prepareStackTrace = function (err, stack) {
+
+ return stack;
+ };
+
+ var capture = {};
+ Error.captureStackTrace(capture, arguments.callee); /*eslint no-caller:0 */
+ var stack = capture.stack;
+
+ Error.prepareStackTrace = v8;
+
+ var trace = exports.formatStack(stack);
+
+ if (slice) {
+ return trace.slice(slice);
+ }
+
+ return trace;
+};
+
+
+exports.displayStack = function (slice) {
+
+ var trace = exports.callStack(slice === undefined ? 1 : slice + 1);
+
+ return exports.formatTrace(trace);
+};
+
+
+exports.abortThrow = false;
+
+
+exports.abort = function (message, hideStack) {
+
+ if (process.env.NODE_ENV === 'test' || exports.abortThrow === true) {
+ throw new Error(message || 'Unknown error');
+ }
+
+ var stack = '';
+ if (!hideStack) {
+ stack = exports.displayStack(1).join('\n\t');
+ }
+ console.log('ABORT: ' + message + '\n\t' + stack);
+ process.exit(1);
+};
+
+
+exports.assert = function (condition /*, msg1, msg2, msg3 */) {
+
+ if (condition) {
+ return;
+ }
+
+ if (arguments.length === 2 && arguments[1] instanceof Error) {
+ throw arguments[1];
+ }
+
+ var msgs = [];
+ for (var i = 1, il = arguments.length; i < il; ++i) {
+ if (arguments[i] !== '') {
+ msgs.push(arguments[i]); // Avoids Array.slice arguments leak, allowing for V8 optimizations
+ }
+ }
+
+ msgs = msgs.map(function (msg) {
+
+ return typeof msg === 'string' ? msg : msg instanceof Error ? msg.message : exports.stringify(msg);
+ });
+ throw new Error(msgs.join(' ') || 'Unknown error');
+};
+
+
+exports.Timer = function () {
+
+ this.ts = 0;
+ this.reset();
+};
+
+
+exports.Timer.prototype.reset = function () {
+
+ this.ts = Date.now();
+};
+
+
+exports.Timer.prototype.elapsed = function () {
+
+ return Date.now() - this.ts;
+};
+
+
+exports.Bench = function () {
+
+ this.ts = 0;
+ this.reset();
+};
+
+
+exports.Bench.prototype.reset = function () {
+
+ this.ts = exports.Bench.now();
+};
+
+
+exports.Bench.prototype.elapsed = function () {
+
+ return exports.Bench.now() - this.ts;
+};
+
+
+exports.Bench.now = function () {
+
+ var ts = process.hrtime();
+ return (ts[0] * 1e3) + (ts[1] / 1e6);
+};
+
+
+// Escape string for Regex construction
+
+exports.escapeRegex = function (string) {
+
+ // Escape ^$.*+-?=!:|\/()[]{},
+ return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&');
+};
+
+
+// Base64url (RFC 4648) encode
+
+exports.base64urlEncode = function (value, encoding) {
+
+ var buf = (Buffer.isBuffer(value) ? value : new Buffer(value, encoding || 'binary'));
+ return buf.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
+};
+
+
+// Base64url (RFC 4648) decode
+
+exports.base64urlDecode = function (value, encoding) {
+
+ if (value &&
+ !/^[\w\-]*$/.test(value)) {
+
+ return new Error('Invalid character');
+ }
+
+ try {
+ var buf = new Buffer(value, 'base64');
+ return (encoding === 'buffer' ? buf : buf.toString(encoding || 'binary'));
+ }
+ catch (err) {
+ return err;
+ }
+};
+
+
+// Escape attribute value for use in HTTP header
+
+exports.escapeHeaderAttribute = function (attribute) {
+
+ // Allowed value characters: !#$%&'()*+,-./:;<=>?@[]^_`{|}~ and space, a-z, A-Z, 0-9, \, "
+
+ exports.assert(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(attribute), 'Bad attribute value (' + attribute + ')');
+
+ return attribute.replace(/\\/g, '\\\\').replace(/\"/g, '\\"'); // Escape quotes and slash
+};
+
+
+exports.escapeHtml = function (string) {
+
+ return Escape.escapeHtml(string);
+};
+
+
+exports.escapeJavaScript = function (string) {
+
+ return Escape.escapeJavaScript(string);
+};
+
+
+exports.nextTick = function (callback) {
+
+ return function () {
+
+ var args = arguments;
+ process.nextTick(function () {
+
+ callback.apply(null, args);
+ });
+ };
+};
+
+
+exports.once = function (method) {
+
+ if (method._hoekOnce) {
+ return method;
+ }
+
+ var once = false;
+ var wrapped = function () {
+
+ if (!once) {
+ once = true;
+ method.apply(null, arguments);
+ }
+ };
+
+ wrapped._hoekOnce = true;
+
+ return wrapped;
+};
+
+
+exports.isAbsolutePath = function (path, platform) {
+
+ if (!path) {
+ return false;
+ }
+
+ if (Path.isAbsolute) { // node >= 0.11
+ return Path.isAbsolute(path);
+ }
+
+ platform = platform || process.platform;
+
+ // Unix
+
+ if (platform !== 'win32') {
+ return path[0] === '/';
+ }
+
+ // Windows
+
+ return !!/^(?:[a-zA-Z]:[\\\/])|(?:[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/])/.test(path); // C:\ or \\something\something
+};
+
+
+exports.isInteger = function (value) {
+
+ return (typeof value === 'number' &&
+ parseFloat(value) === parseInt(value, 10) &&
+ !isNaN(value));
+};
+
+
+exports.ignore = function () { };
+
+
+exports.inherits = Util.inherits;
+
+
+exports.format = Util.format;
+
+
+exports.transform = function (source, transform, options) {
+
+ exports.assert(source === null || source === undefined || typeof source === 'object', 'Invalid source object: must be null, undefined, or an object');
+
+ var result = {};
+ var keys = Object.keys(transform);
+
+ for (var k = 0, kl = keys.length; k < kl; ++k) {
+ var key = keys[k];
+ var path = key.split('.');
+ var sourcePath = transform[key];
+
+ exports.assert(typeof sourcePath === 'string', 'All mappings must be "." delineated strings');
+
+ var segment;
+ var res = result;
+
+ while (path.length > 1) {
+ segment = path.shift();
+ if (!res[segment]) {
+ res[segment] = {};
+ }
+ res = res[segment];
+ }
+ segment = path.shift();
+ res[segment] = exports.reach(source, sourcePath, options);
+ }
+
+ return result;
+};
+
+
+exports.uniqueFilename = function (path, extension) {
+
+ if (extension) {
+ extension = extension[0] !== '.' ? '.' + extension : extension;
+ }
+ else {
+ extension = '';
+ }
+
+ path = Path.resolve(path);
+ var name = [Date.now(), process.pid, Crypto.randomBytes(8).toString('hex')].join('-') + extension;
+ return Path.join(path, name);
+};
+
+
+exports.stringify = function () {
+
+ try {
+ return JSON.stringify.apply(null, arguments);
+ }
+ catch (err) {
+ return '[Cannot display object: ' + err.message + ']';
+ }
+};
+
+
+exports.shallow = function (source) {
+
+ var target = {};
+ var keys = Object.keys(source);
+ for (var i = 0, il = keys.length; i < il; ++i) {
+ var key = keys[i];
+ target[key] = source[key];
+ }
+
+ return target;
+};
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 789de2adbf..53b174e956 100755..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,21 +1,10 @@
{
"name": "hoek",
"description": "General purpose node utilities",
- "version": "0.9.1",
- "author": {
- "name": "Eran Hammer",
- "email": "eran@hueniverse.com",
- "url": "http://hueniverse.com"
- },
- "contributors": [
- {
- "name": "Van Nguyen",
- "email": "the.gol.effect@gmail.com"
- }
- ],
+ "version": "2.11.0",
"repository": {
"type": "git",
- "url": "git://github.com/spumko/hoek"
+ "url": "git://github.com/hapijs/hoek"
},
"main": "index",
"keywords": [
@@ -26,8 +15,8 @@
},
"dependencies": {},
"devDependencies": {
- "lab": "0.1.x",
- "complexity-report": "0.x.x"
+ "code": "1.x.x",
+ "lab": "5.x.x"
},
"scripts": {
"test": "make test-cov"
@@ -35,19 +24,22 @@
"licenses": [
{
"type": "BSD",
- "url": "http://github.com/spumko/hoek/raw/master/LICENSE"
+ "url": "http://github.com/hapijs/hoek/raw/master/LICENSE"
}
],
- "_id": "hoek@0.9.1",
- "dist": {
- "shasum": "3d322462badf07716ea7eb85baf88079cddce505",
- "tarball": "http://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz"
+ "gitHead": "6f034aa12206f2ab740a9ea6ca64a4d5c7b7dfba",
+ "bugs": {
+ "url": "https://github.com/hapijs/hoek/issues"
},
- "_from": "hoek@>=0.9.0 <0.10.0",
- "_npmVersion": "1.2.18",
+ "homepage": "https://github.com/hapijs/hoek",
+ "_id": "hoek@2.11.0",
+ "_shasum": "e588ec66a6b405b0e7140308720e1e1cd4f035b7",
+ "_from": "hoek@>=2.0.0 <3.0.0",
+ "_npmVersion": "2.1.9",
+ "_nodeVersion": "0.10.32",
"_npmUser": {
- "name": "hueniverse",
- "email": "eran@hueniverse.com"
+ "name": "nlf",
+ "email": "quitlahok@gmail.com"
},
"maintainers": [
{
@@ -55,16 +47,19 @@
"email": "eran@hueniverse.com"
},
{
- "name": "thegoleffect",
- "email": "thegoleffect@gmail.com"
+ "name": "wyatt",
+ "email": "wpreul@gmail.com"
+ },
+ {
+ "name": "nlf",
+ "email": "quitlahok@gmail.com"
}
],
- "directories": {},
- "_shasum": "3d322462badf07716ea7eb85baf88079cddce505",
- "_resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz",
- "bugs": {
- "url": "https://github.com/spumko/hoek/issues"
+ "dist": {
+ "shasum": "e588ec66a6b405b0e7140308720e1e1cd4f035b7",
+ "tarball": "http://registry.npmjs.org/hoek/-/hoek-2.11.0.tgz"
},
- "readme": "ERROR: No README data found!",
- "homepage": "https://github.com/spumko/hoek"
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/hoek/-/hoek-2.11.0.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js
index 4dddd77dc9..a5d048f7bc 100644..100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js
@@ -1,86 +1,88 @@
-// Load modules
-
-var Lab = require('lab');
-var Hoek = require('../lib');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
-
-
-describe('Hoek', function () {
-
- describe('#escapeJavaScript', function () {
-
- it('encodes / characters', function (done) {
-
- var encoded = Hoek.escapeJavaScript('<script>alert(1)</script>');
- expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e');
- done();
- });
-
- it('encodes \' characters', function (done) {
-
- var encoded = Hoek.escapeJavaScript('something(\'param\')');
- expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29');
- done();
- });
-
- it('encodes large unicode characters with the correct padding', function (done) {
-
- var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000));
- expect(encoded).to.equal('\\u0500\\u1000');
- done();
- });
-
- it('doesn\'t throw an exception when passed null', function (done) {
-
- var encoded = Hoek.escapeJavaScript(null);
- expect(encoded).to.equal('');
- done();
- });
- });
-
- describe('#escapeHtml', function () {
-
- it('encodes / characters', function (done) {
-
- var encoded = Hoek.escapeHtml('<script>alert(1)</script>');
- expect(encoded).to.equal('&lt;script&gt;alert&#x28;1&#x29;&lt;&#x2f;script&gt;');
- done();
- });
-
- it('encodes < and > as named characters', function (done) {
-
- var encoded = Hoek.escapeHtml('<script><>');
- expect(encoded).to.equal('&lt;script&gt;&lt;&gt;');
- done();
- });
-
- it('encodes large unicode characters', function (done) {
-
- var encoded = Hoek.escapeHtml(String.fromCharCode(500) + String.fromCharCode(1000));
- expect(encoded).to.equal('&#500;&#1000;');
- done();
- });
-
- it('doesn\'t throw an exception when passed null', function (done) {
-
- var encoded = Hoek.escapeHtml(null);
- expect(encoded).to.equal('');
- done();
- });
- });
-});
-
-
+// Load modules
+
+var Code = require('code');
+var Hoek = require('../lib');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+describe('escapeJavaScript()', function () {
+
+ it('encodes / characters', function (done) {
+
+ var encoded = Hoek.escapeJavaScript('<script>alert(1)</script>');
+ expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e');
+ done();
+ });
+
+ it('encodes \' characters', function (done) {
+
+ var encoded = Hoek.escapeJavaScript('something(\'param\')');
+ expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29');
+ done();
+ });
+
+ it('encodes large unicode characters with the correct padding', function (done) {
+
+ var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000));
+ expect(encoded).to.equal('\\u0500\\u1000');
+ done();
+ });
+
+ it('doesn\'t throw an exception when passed null', function (done) {
+
+ var encoded = Hoek.escapeJavaScript(null);
+ expect(encoded).to.equal('');
+ done();
+ });
+});
+
+describe('escapeHtml()', function () {
+
+ it('encodes / characters', function (done) {
+
+ var encoded = Hoek.escapeHtml('<script>alert(1)</script>');
+ expect(encoded).to.equal('&lt;script&gt;alert&#x28;1&#x29;&lt;&#x2f;script&gt;');
+ done();
+ });
+
+ it('encodes < and > as named characters', function (done) {
+
+ var encoded = Hoek.escapeHtml('<script><>');
+ expect(encoded).to.equal('&lt;script&gt;&lt;&gt;');
+ done();
+ });
+
+ it('encodes large unicode characters', function (done) {
+
+ var encoded = Hoek.escapeHtml(String.fromCharCode(500) + String.fromCharCode(1000));
+ expect(encoded).to.equal('&#500;&#1000;');
+ done();
+ });
+
+ it('doesn\'t throw an exception when passed null', function (done) {
+
+ var encoded = Hoek.escapeHtml(null);
+ expect(encoded).to.equal('');
+ done();
+ });
+
+ it('encodes {} characters', function (done) {
+
+ var encoded = Hoek.escapeHtml('{}');
+ expect(encoded).to.equal('&#x7b;&#x7d;');
+ done();
+ });
+});
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 c40e3ad9a4..aad04356d5 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
@@ -1,1078 +1,2247 @@
-// Load modules
-
-var Lab = require('lab');
-var Hoek = require('../lib');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
-
-
-describe('Hoek', function () {
-
- var nestedObj = {
- v: [7,8,9],
- w: /^something$/igm,
- x: {
- a: [1, 2, 3],
- b: 123456,
- c: new Date(),
- d: /hi/igm,
- e: /hello/
- },
- y: 'y',
- z: new Date()
- };
-
- var dupsArray = [nestedObj, { z: 'z' }, nestedObj];
- var reducedDupsArray = [nestedObj, { z: 'z' }];
-
- describe('#clone', function () {
-
- it('should clone a nested object', function (done) {
-
- var a = nestedObj;
- var b = Hoek.clone(a);
-
- expect(a).to.deep.equal(b);
- expect(a.z.getTime()).to.equal(b.z.getTime());
- done();
- });
-
- it('should clone a null object', function (done) {
-
- var b = Hoek.clone(null);
-
- expect(b).to.equal(null);
- done();
- });
-
- it('should not convert undefined properties to null', function (done) {
-
- var obj = { something: undefined };
- var b = Hoek.clone(obj);
-
- expect(typeof b.something).to.equal('undefined');
- done();
- });
-
- it('should not throw on circular reference', function (done) {
-
- var a = {};
- a.x = a;
-
- var test = (function () {
-
- var b = Hoek.clone(a);
- });
-
- expect(test).to.not.throw();
- done();
- });
-
- it('should properly clone circular reference', function (done) {
-
- var x = {
- 'z': new Date()
- };
- x.y = x;
-
- var b = Hoek.clone(x);
- expect(Object.keys(b.y)).to.deep.equal(Object.keys(x))
- expect(b.z).to.not.equal(x.z);
- expect(b.y).to.not.equal(x.y);
- expect(b.y.z).to.not.equal(x.y.z);
- expect(b.y).to.equal(b);
- expect(b.y.y.y.y).to.equal(b);
- done();
- });
-
- it('should properly clone deeply nested object', function (done) {
-
- var a = {
- x: {
- y: {
- a: [1, 2, 3],
- b: 123456,
- c: new Date(),
- d: /hi/igm,
- e: /hello/
- },
- }
- };
-
- var b = Hoek.clone(a);
-
- expect(a).to.deep.equal(b);
- expect(a.x.y.c.getTime()).to.equal(b.x.y.c.getTime());
- done();
- });
-
- it('should properly clone arrays', function (done) {
-
- var a = [1,2,3];
-
- var b = Hoek.clone(a);
-
- expect(a).to.deep.equal(b);
- done();
- });
-
- it('should perform actual copy for shallow keys (no pass by reference)', function (done) {
-
- var x = Hoek.clone(nestedObj);
- var y = Hoek.clone(nestedObj);
-
- // Date
- expect(x.z).to.not.equal(nestedObj.z);
- expect(x.z).to.not.equal(y.z);
-
- // Regex
- expect(x.w).to.not.equal(nestedObj.w);
- expect(x.w).to.not.equal(y.w);
-
- // Array
- expect(x.v).to.not.equal(nestedObj.v);
- expect(x.v).to.not.equal(y.v);
-
- // Immutable(s)
- x.y = 5;
- expect(x.y).to.not.equal(nestedObj.y);
- expect(x.y).to.not.equal(y.y);
-
- done();
- });
-
- it('should perform actual copy for deep keys (no pass by reference)', function (done) {
-
- var x = Hoek.clone(nestedObj);
- var y = Hoek.clone(nestedObj);
-
- expect(x.x.c).to.not.equal(nestedObj.x.c);
- expect(x.x.c).to.not.equal(y.x.c);
-
- expect(x.x.c.getTime()).to.equal(nestedObj.x.c.getTime());
- expect(x.x.c.getTime()).to.equal(y.x.c.getTime());
- done();
- });
-
- it('copies functions with properties', function (done) {
-
- var a = {
- x: function () { return 1; },
- y: {}
- };
- a.x.z = 'string in function';
- a.x.v = function () { return 2; };
- a.y.u = a.x;
-
- var b = Hoek.clone(a);
- expect(b.x()).to.equal(1);
- expect(b.x.v()).to.equal(2);
- expect(b.y.u).to.equal(b.x);
- expect(b.x.z).to.equal('string in function');
- done();
- });
-
- it('should copy a buffer', function(done){
- var tls = {
- key: new Buffer([1,2,3,4,5]),
- cert: new Buffer([1,2,3,4,5,6,10])
- }
-
- copiedTls = Hoek.clone(tls);
- expect(Buffer.isBuffer(copiedTls.key)).to.equal(true);
- expect(JSON.stringify(copiedTls.key)).to.equal(JSON.stringify(tls.key))
- expect(Buffer.isBuffer(copiedTls.cert)).to.equal(true);
- expect(JSON.stringify(copiedTls.cert)).to.equal(JSON.stringify(tls.cert))
- done();
- });
- });
-
- describe('#merge', function () {
-
- it('does not throw if source is null', function (done) {
-
- var a = {};
- var b = null;
- var c = null;
-
- expect(function () {
-
- c = Hoek.merge(a, b);
- }).to.not.throw();
-
- expect(c).to.equal(a);
- done();
- });
-
- it('does not throw if source is undefined', function (done) {
-
- var a = {};
- var b = undefined;
- var c = null;
-
- expect(function () {
-
- c = Hoek.merge(a, b);
- }).to.not.throw();
-
- expect(c).to.equal(a);
- done();
- });
-
- it('throws if source is not an object', function (done) {
-
- expect(function () {
-
- var a = {};
- var b = 0;
-
- Hoek.merge(a, b);
- }).to.throw('Invalid source value: must be null, undefined, or an object');
- done();
- });
-
- it('throws if target is not an object', function (done) {
-
- expect(function () {
-
- var a = 0;
- var b = {};
-
- Hoek.merge(a, b);
- }).to.throw('Invalid target value: must be an object');
- done();
- });
-
- it('throws if target is not an array and source is', function (done) {
-
- expect(function () {
-
- var a = {};
- var b = [1, 2];
-
- Hoek.merge(a, b);
- }).to.throw('Cannot merge array onto an object');
- done();
- });
-
- it('returns the same object when merging arrays', function (done) {
-
- var a = [];
- var b = [1, 2];
-
- expect(Hoek.merge(a, b)).to.equal(a);
- done();
- });
-
- it('should combine an empty object with a non-empty object', function (done) {
-
- var a = {};
- var b = nestedObj;
-
- var c = Hoek.merge(a, b);
- expect(a).to.deep.equal(b);
- expect(c).to.deep.equal(b);
- done();
- });
-
- it('should override values in target', function (done) {
-
- var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' };
- var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' };
-
- var c = Hoek.merge(a, b);
- expect(c.x).to.equal(null);
- expect(c.y).to.equal(2);
- expect(c.z).to.equal(4);
- expect(c.v).to.equal(0);
- expect(c.m).to.equal('123');
- expect(c.t).to.deep.equal({ u: 6 });
- done();
- });
-
- it('should override values in target (flip)', function (done) {
-
- var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' };
- var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' };
-
- var d = Hoek.merge(b, a);
- expect(d.x).to.equal(1);
- expect(d.y).to.equal(2);
- expect(d.z).to.equal(3);
- expect(d.v).to.equal(5);
- expect(d.m).to.equal('abc');
- expect(d.t).to.deep.equal('test');
- done();
- });
- });
-
- describe('#applyToDefaults', function () {
-
- var defaults = {
- a: 1,
- b: 2,
- c: {
- d: 3,
- e: [5, 6]
- },
- f: 6,
- g: 'test'
- };
-
- it('should return null if options is false', function (done) {
-
- var result = Hoek.applyToDefaults(defaults, false);
- expect(result).to.equal(null);
- done();
- });
-
- it('should return a copy of defaults if options is true', function (done) {
-
- var result = Hoek.applyToDefaults(defaults, true);
- expect(result).to.deep.equal(result);
- done();
- });
-
- it('should apply object to defaults', function (done) {
-
- var obj = {
- a: null,
- c: {
- e: [4]
- },
- f: 0,
- g: {
- h: 5
- }
- };
-
- var result = Hoek.applyToDefaults(defaults, obj);
- expect(result.c.e).to.deep.equal([4]);
- expect(result.a).to.equal(1);
- expect(result.b).to.equal(2);
- expect(result.f).to.equal(0);
- expect(result.g).to.deep.equal({ h: 5 });
- done();
- });
- });
-
- describe('#unique', function () {
-
- it('should ensure uniqueness within array of objects based on subkey', function (done) {
-
- var a = Hoek.unique(dupsArray, 'x');
- expect(a).to.deep.equal(reducedDupsArray);
- done();
- });
-
- it('removes duplicated without key', function (done) {
-
- expect(Hoek.unique([1, 2, 3, 4, 2, 1, 5])).to.deep.equal([1, 2, 3, 4, 5]);
- done();
- });
- });
-
- describe('#mapToObject', function () {
-
- it('should return null on null array', function (done) {
-
- var a = Hoek.mapToObject(null);
- expect(a).to.equal(null);
- done();
- });
-
- it('should convert basic array to existential object', function (done) {
-
- var keys = [1, 2, 3, 4];
- var a = Hoek.mapToObject(keys);
- for (var i in keys) {
- expect(a[keys[i]]).to.equal(true);
- }
- done();
- });
-
- it('should convert array of objects to existential object', function (done) {
-
- var keys = [{ x: 1 }, { x: 2 }, { x: 3 }];
- var subkey = 'x';
- var a = Hoek.mapToObject(keys, subkey);
- for (var i in keys) {
- expect(a[keys[i][subkey]]).to.equal(true);
- }
- done();
- });
- });
-
- describe('#intersect', function () {
-
- it('should return the common objects of two arrays', function (done) {
-
- var array1 = [1, 2, 3, 4, 4, 5, 5];
- var array2 = [5, 4, 5, 6, 7];
- var common = Hoek.intersect(array1, array2);
- expect(common.length).to.equal(2);
- done();
- });
-
- it('should return just the first common object of two arrays', function (done) {
-
- var array1 = [1, 2, 3, 4, 4, 5, 5];
- var array2 = [5, 4, 5, 6, 7];
- var common = Hoek.intersect(array1, array2, true);
- expect(common).to.equal(5);
- done();
- });
-
- it('should return an empty array if either input is null', function (done) {
-
- expect(Hoek.intersect([1], null).length).to.equal(0);
- expect(Hoek.intersect(null, [1]).length).to.equal(0);
- done();
- });
-
- it('should return the common objects of object and array', function (done) {
-
- var array1 = [1, 2, 3, 4, 4, 5, 5];
- var array2 = [5, 4, 5, 6, 7];
- var common = Hoek.intersect(Hoek.mapToObject(array1), array2);
- expect(common.length).to.equal(2);
- done();
- });
- });
-
- describe('#matchKeys', function () {
-
- it('should match the existing object keys', function (done) {
-
- var obj = {
- a: 1,
- b: 2,
- c: 3,
- d: null
- };
-
- expect(Hoek.matchKeys(obj, ['b', 'c', 'd', 'e'])).to.deep.equal(['b', 'c', 'd']);
- done();
- });
- });
-
- describe('#flatten', function () {
-
- it('should return a flat array', function (done) {
-
- var result = Hoek.flatten([1, 2, [3, 4, [5, 6], [7], 8], [9], [10, [11, 12]], 13]);
- expect(result.length).to.equal(13);
- expect(result).to.deep.equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]);
- done();
- });
- });
-
- describe('#removeKeys', function () {
-
- var objWithHiddenKeys = {
- location: {
- name: 'San Bruno'
- },
- company: {
- name: '@WalmartLabs'
- }
- };
-
- it('should delete params with definition\'s hide set to true', function (done) {
-
- var a = Hoek.removeKeys(objWithHiddenKeys, ['location']);
- expect(objWithHiddenKeys.location).to.not.exist;
- expect(objWithHiddenKeys.company).to.exist;
- done();
- });
- });
-
- describe('#reach', function () {
-
- var obj = {
- a: {
- b: {
- c: {
- d: 1,
- e: 2
- },
- f: 'hello'
- },
- g: {
- h: 3
- }
- },
- i: function () { }
- };
-
- it('returns a valid member', function (done) {
-
- expect(Hoek.reach(obj, 'a.b.c.d')).to.equal(1);
- done();
- });
-
- it('returns null on null object', function (done) {
-
- expect(Hoek.reach(null, 'a.b.c.d')).to.not.exist;
- done();
- });
-
- it('returns null on missing member', function (done) {
-
- expect(Hoek.reach(obj, 'a.b.c.d.x')).to.not.exist;
- done();
- });
-
- it('returns null on invalid member', function (done) {
-
- expect(Hoek.reach(obj, 'a.b.c.d-.x')).to.not.exist;
- done();
- });
-
- it('returns function member', function (done) {
-
- expect(typeof Hoek.reach(obj, 'i')).to.equal('function');
- done();
- });
- });
-
- describe('#inheritAsync', function () {
-
- it('should inherit selected methods and wrap in async call', function (done) {
-
- var proto = {
- a: function () {
- return 'a!';
- },
- b: function () {
- return 'b!';
- },
- c: function () {
- throw new Error('c!');
- }
- };
-
- var targetFunc = function () { };
- targetFunc.prototype.c = function () {
-
- return 'oops';
- };
-
- Hoek.inheritAsync(targetFunc, proto, ['a', 'c']);
- var target = new targetFunc();
-
- expect(typeof target.a).to.equal('function');
- expect(typeof target.c).to.equal('function');
- expect(target.b).to.not.exist;
-
- target.a(function (err, result) {
-
- expect(err).to.not.exist;
- expect(result).to.equal('a!');
-
- target.c(function (err, result) {
-
- expect(result).to.not.exist;
- expect(err.message).to.equal('c!');
- done();
- });
- });
- });
- });
-
- describe('#callStack', function () {
-
- it('should return the full call stack', function (done) {
-
- var stack = Hoek.callStack();
- expect(stack[0][0]).to.contain('index.js');
- expect(stack[0][2]).to.equal(30);
- done();
- });
- });
-
- describe('#displayStack ', function () {
-
- it('should return the full call stack for display', function (done) {
-
- var stack = Hoek.displayStack();
- expect(stack[0]).to.contain('test/index.js:');
- done();
- });
-
- it('should include constructor functions correctly', function (done) {
-
- var Something = function (next) {
-
- next();
- };
-
- var something = new Something(function () {
-
- var stack = Hoek.displayStack();
- expect(stack[1]).to.contain('new Something');
- done();
- });
- });
- });
-
- describe('#abort', function () {
-
- it('should exit process when not in test mode', function (done) {
-
- var env = process.env.NODE_ENV;
- var write = process.stdout.write;
- var exit = process.exit;
-
- process.env.NODE_ENV = 'nottatest';
- process.stdout.write = function () { };
- process.exit = function (state) {
-
- process.exit = exit;
- process.env.NODE_ENV = env;
- process.stdout.write = write;
-
- expect(state).to.equal(1);
- done();
- };
-
- Hoek.abort('Boom');
- });
-
- it('should throw when not in test mode and abortThrow is true', function (done) {
-
- var env = process.env.NODE_ENV;
- process.env.NODE_ENV = 'nottatest';
- Hoek.abortThrow = true;
-
- var fn = function () {
-
- Hoek.abort('my error message');
- };
-
- expect(fn).to.throw('my error message');
- Hoek.abortThrow = false;
- process.env.NODE_ENV = env;
-
- done();
- });
-
-
- it('should respect hideStack argument', function (done) {
-
- var env = process.env.NODE_ENV;
- var write = process.stdout.write;
- var exit = process.exit;
- var output = '';
-
- process.exit = function () { };
- process.env.NODE_ENV = '';
- process.stdout.write = function (message) {
-
- output = message;
- };
-
- Hoek.abort('my error message', true);
-
- process.env.NODE_ENV = env;
- process.stdout.write = write;
- process.exit = exit;
-
- expect(output).to.equal('ABORT: my error message\n\t\n');
-
- done();
- });
-
- it('should default to showing stack', function (done) {
-
- var env = process.env.NODE_ENV;
- var write = process.stdout.write;
- var exit = process.exit;
- var output = '';
-
- process.exit = function () { };
- process.env.NODE_ENV = '';
- process.stdout.write = function (message) {
-
- output = message;
- };
-
- Hoek.abort('my error message');
-
- process.env.NODE_ENV = env;
- process.stdout.write = write;
- process.exit = exit;
-
- expect(output).to.contain('index.js');
-
- done();
- });
- });
-
- describe('#assert', function () {
-
- it('should throw an Error when using assert in a test', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false, 'my error message');
- };
-
- expect(fn).to.throw('my error message');
- done();
- });
-
- it('should throw an Error when using assert in a test with no message', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false);
- };
-
- expect(fn).to.throw('Unknown error');
- done();
- });
-
- it('should throw an Error when using assert in a test with multipart message', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false, 'This', 'is', 'my message');
- };
-
- expect(fn).to.throw('This is my message');
- done();
- });
-
- it('should throw an Error when using assert in a test with object message', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false, 'This', 'is', { spinal: 'tap' });
- };
-
- expect(fn).to.throw('This is {"spinal":"tap"}');
- done();
- });
-
- it('should throw an Error when using assert in a test with error object message', function (done) {
-
- var fn = function () {
-
- Hoek.assert(false, new Error('This is spinal tap'));
- };
-
- expect(fn).to.throw('This is spinal tap');
- done();
- });
- });
-
- describe('#loadDirModules', function () {
-
- it('should load modules from directory', function (done) {
-
- var target = {};
- Hoek.loadDirModules(__dirname + '/modules', ['test2'], target);
- expect(target.Test1.x).to.equal(1);
- expect(target.Test2).to.not.exist;
- expect(target.Test3.z).to.equal(3);
- done();
- });
-
- it('should list modules from directory into function', function (done) {
-
- var target = {};
- Hoek.loadDirModules(__dirname + '/modules', ['test2'], function (path, name, capName) {
-
- target[name] = capName;
- });
-
- expect(target.test1).to.equal('Test1');
- expect(target.test2).to.not.exist;
- expect(target.test3).to.equal('Test3');
- done();
- });
- });
-
- describe('#rename', function () {
-
- it('should rename object key', function (done) {
-
- var a = { b: 'c' };
- Hoek.rename(a, 'b', 'x');
- expect(a.b).to.not.exist;
- expect(a.x).to.equal('c');
- done();
- });
- });
-
- describe('Timer', function () {
-
- it('should return time elapsed', function (done) {
-
- var timer = new Hoek.Timer();
- setTimeout(function () {
-
- expect(timer.elapsed()).to.be.above(9);
- done();
- }, 12);
- });
- });
-
- describe('#loadPackage', function () {
-
- it('should', function (done) {
-
- var pack = Hoek.loadPackage();
- expect(pack.name).to.equal('hoek');
- done();
- });
- });
-
- describe('#escapeRegex', function () {
-
- it('should escape all special regular expression characters', function (done) {
-
- var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,');
- expect(a).to.equal('4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`"\\(>\\)\\[<\\]d\\{\\}s\\,');
- done();
- });
- });
-
- describe('#toss', function () {
-
- it('should call callback with new error', function (done) {
-
- var callback = function (err) {
-
- expect(err).to.exist;
- expect(err.message).to.equal('bug');
- done();
- };
-
- Hoek.toss(true, 'feature', callback);
- Hoek.toss(false, 'bug', callback);
- });
-
- it('should call callback with new error and no message', function (done) {
-
- Hoek.toss(false, function (err) {
-
- expect(err).to.exist;
- expect(err.message).to.equal('');
- done();
- });
- });
-
- it('should call callback with error condition', function (done) {
-
- Hoek.toss(new Error('boom'), function (err) {
-
- expect(err).to.exist;
- expect(err.message).to.equal('boom');
- done();
- });
- });
-
- it('should call callback with new error using message with error condition', function (done) {
-
- Hoek.toss(new Error('ka'), 'boom', function (err) {
-
- expect(err).to.exist;
- expect(err.message).to.equal('boom');
- done();
- });
- });
-
- it('should call callback with new error using passed error with error condition', function (done) {
-
- Hoek.toss(new Error('ka'), new Error('boom'), function (err) {
-
- expect(err).to.exist;
- expect(err.message).to.equal('boom');
- done();
- });
- });
- });
-
- describe('Base64Url', function () {
-
- var base64str = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn-AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq-wsbKztLW2t7i5uru8vb6_wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t_g4eLj5OXm5-jp6uvs7e7v8PHy8_T19vf4-fr7_P3-_w';
- var str = unescape('%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20%21%22%23%24%25%26%27%28%29*+%2C-./0123456789%3A%3B%3C%3D%3E%3F@ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E%7F%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF');
-
- describe('#base64urlEncode', function () {
-
- it('should base64 URL-safe a string', function (done) {
-
- expect(Hoek.base64urlEncode(str)).to.equal(base64str);
- done();
- });
- });
-
- describe('#base64urlDecode', function () {
-
- it('should un-base64 URL-safe a string', function (done) {
-
- expect(Hoek.base64urlDecode(base64str)).to.equal(str);
- done();
- });
-
- it('should return error on undefined input', function (done) {
-
- expect(Hoek.base64urlDecode().message).to.exist;
- done();
- });
-
- it('should return error on invalid input', function (done) {
-
- expect(Hoek.base64urlDecode('*').message).to.exist;
- done();
- });
- });
- });
-
- describe('#escapeHeaderAttribute', function () {
-
- it('should not alter ascii values', function (done) {
-
- var a = Hoek.escapeHeaderAttribute('My Value');
- expect(a).to.equal('My Value');
- done();
- });
-
- it('should escape all special HTTP header attribute characters', function (done) {
-
- var a = Hoek.escapeHeaderAttribute('I said go!!!#"' + String.fromCharCode(92));
- expect(a).to.equal('I said go!!!#\\"\\\\');
- done();
- });
-
- it('should throw on large unicode characters', function (done) {
-
- var fn = function () {
-
- Hoek.escapeHeaderAttribute('this is a test' + String.fromCharCode(500) + String.fromCharCode(300));
- };
-
- expect(fn).to.throw(Error);
- done();
- });
-
- it('should throw on CRLF to prevent response splitting', function (done) {
-
- var fn = function () {
-
- Hoek.escapeHeaderAttribute('this is a test\r\n');
- };
-
- expect(fn).to.throw(Error);
- done();
- });
- });
-
- describe('#escapeHtml', function () {
-
- it('should escape all special HTML characters', function (done) {
-
- var a = Hoek.escapeHtml('&<>"\'`');
- expect(a).to.equal('&amp;&lt;&gt;&quot;&#x27;&#x60;');
- done();
- });
-
- it('should return empty string on falsy input', function (done) {
-
- var a = Hoek.escapeHtml('');
- expect(a).to.equal('');
- done();
- });
-
- it('should return unchanged string on no reserved input', function (done) {
-
- var a = Hoek.escapeHtml('abc');
- expect(a).to.equal('abc');
- done();
- });
- });
-
- describe('#printEvent', function () {
-
- it('outputs event as string', function (done) {
-
- var event = {
- timestamp: (new Date(2013, 1, 1, 6, 30, 45, 123)).getTime(),
- tags: ['a', 'b', 'c'],
- data: { some: 'data' }
- };
-
- Hoek.consoleFunc = function (string) {
-
- Hoek.consoleFunc = console.log;
- expect(string).to.equal('130201/063045.123, a, {"some":"data"}');
- done();
- };
-
- Hoek.printEvent(event);
- });
-
- it('outputs JSON error', function (done) {
-
- var event = {
- timestamp: (new Date(2013, 1, 1, 6, 30, 45, 123)).getTime(),
- tags: ['a', 'b', 'c'],
- data: { some: 'data' }
- };
-
- event.data.a = event.data;
-
- Hoek.consoleFunc = function (string) {
-
- Hoek.consoleFunc = console.log;
- expect(string).to.equal('130201/063045.123, a, JSON Error: Converting circular structure to JSON');
- done();
- };
-
- Hoek.printEvent(event);
- });
- });
-
- describe('#nextTick', function () {
-
- it('calls the provided callback on nextTick', function (done) {
-
- var a = 0;
-
- var inc = function (step, next) {
-
- a += step;
- next();
- };
-
- var ticked = Hoek.nextTick(inc);
-
- ticked(5, function () {
-
- expect(a).to.equal(6);
- done();
- });
-
- expect(a).to.equal(0);
- inc(1, function () {
-
- expect(a).to.equal(1);
- });
- });
- });
-});
-
+// Load modules
+
+var Fs = require('fs');
+var Path = require('path');
+var Code = require('code');
+var Hoek = require('../lib');
+var Lab = require('lab');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
+
+
+var nestedObj = {
+ v: [7, 8, 9],
+ w: /^something$/igm,
+ x: {
+ a: [1, 2, 3],
+ b: 123456,
+ c: new Date(),
+ d: /hi/igm,
+ e: /hello/
+ },
+ y: 'y',
+ z: new Date(1378775452757)
+};
+
+var dupsArray = [nestedObj, { z: 'z' }, nestedObj];
+var reducedDupsArray = [nestedObj, { z: 'z' }];
+
+describe('clone()', function () {
+
+ it('clones a nested object', function (done) {
+
+ var a = nestedObj;
+ var b = Hoek.clone(a);
+
+ expect(a).to.deep.equal(b);
+ expect(a.z.getTime()).to.equal(b.z.getTime());
+ done();
+ });
+
+ it('clones a null object', function (done) {
+
+ var b = Hoek.clone(null);
+
+ expect(b).to.equal(null);
+ done();
+ });
+
+ it('should not convert undefined properties to null', function (done) {
+
+ var obj = { something: undefined };
+ var b = Hoek.clone(obj);
+
+ expect(typeof b.something).to.equal('undefined');
+ done();
+ });
+
+ it('should not throw on circular reference', function (done) {
+
+ var a = {};
+ a.x = a;
+
+ var test = function () {
+
+ var b = Hoek.clone(a);
+ };
+
+ expect(test).to.not.throw();
+ done();
+ });
+
+ it('clones circular reference', function (done) {
+
+ var x = {
+ 'z': new Date()
+ };
+ x.y = x;
+
+ var b = Hoek.clone(x);
+ expect(Object.keys(b.y)).to.deep.equal(Object.keys(x));
+ expect(b.z).to.not.equal(x.z);
+ expect(b.y).to.not.equal(x.y);
+ expect(b.y.z).to.not.equal(x.y.z);
+ expect(b.y).to.equal(b);
+ expect(b.y.y.y.y).to.equal(b);
+ done();
+ });
+
+ it('clones an object with a null prototype', function (done) {
+
+ var obj = Object.create(null);
+ var b = Hoek.clone(obj);
+
+ expect(b).to.deep.equal(obj);
+ done();
+ });
+
+ it('clones deeply nested object', function (done) {
+
+ var a = {
+ x: {
+ y: {
+ a: [1, 2, 3],
+ b: 123456,
+ c: new Date(),
+ d: /hi/igm,
+ e: /hello/
+ }
+ }
+ };
+
+ var b = Hoek.clone(a);
+
+ expect(a).to.deep.equal(b);
+ expect(a.x.y.c.getTime()).to.equal(b.x.y.c.getTime());
+ done();
+ });
+
+ it('clones arrays', function (done) {
+
+ var a = [1, 2, 3];
+
+ var b = Hoek.clone(a);
+
+ expect(a).to.deep.equal(b);
+ done();
+ });
+
+ it('performs actual copy for shallow keys (no pass by reference)', function (done) {
+
+ var x = Hoek.clone(nestedObj);
+ var y = Hoek.clone(nestedObj);
+
+ // Date
+ expect(x.z).to.not.equal(nestedObj.z);
+ expect(x.z).to.not.equal(y.z);
+
+ // Regex
+ expect(x.w).to.not.equal(nestedObj.w);
+ expect(x.w).to.not.equal(y.w);
+
+ // Array
+ expect(x.v).to.not.equal(nestedObj.v);
+ expect(x.v).to.not.equal(y.v);
+
+ // Immutable(s)
+ x.y = 5;
+ expect(x.y).to.not.equal(nestedObj.y);
+ expect(x.y).to.not.equal(y.y);
+
+ done();
+ });
+
+ it('performs actual copy for deep keys (no pass by reference)', function (done) {
+
+ var x = Hoek.clone(nestedObj);
+ var y = Hoek.clone(nestedObj);
+
+ expect(x.x.c).to.not.equal(nestedObj.x.c);
+ expect(x.x.c).to.not.equal(y.x.c);
+
+ expect(x.x.c.getTime()).to.equal(nestedObj.x.c.getTime());
+ expect(x.x.c.getTime()).to.equal(y.x.c.getTime());
+ done();
+ });
+
+ it('copies functions with properties', function (done) {
+
+ var a = {
+ x: function () { return 1; },
+ y: {}
+ };
+ a.x.z = 'string in function';
+ a.x.v = function () { return 2; };
+ a.y.u = a.x;
+
+ var b = Hoek.clone(a);
+ expect(b.x()).to.equal(1);
+ expect(b.x.v()).to.equal(2);
+ expect(b.y.u).to.equal(b.x);
+ expect(b.x.z).to.equal('string in function');
+ done();
+ });
+
+ it('should copy a buffer', function (done) {
+ var tls = {
+ key: new Buffer([1, 2, 3, 4, 5]),
+ cert: new Buffer([1, 2, 3, 4, 5, 6, 10])
+ };
+
+ var copiedTls = Hoek.clone(tls);
+ expect(Buffer.isBuffer(copiedTls.key)).to.equal(true);
+ expect(JSON.stringify(copiedTls.key)).to.equal(JSON.stringify(tls.key));
+ expect(Buffer.isBuffer(copiedTls.cert)).to.equal(true);
+ expect(JSON.stringify(copiedTls.cert)).to.equal(JSON.stringify(tls.cert));
+ done();
+ });
+
+ it('clones an object with a prototype', function (done) {
+
+ var Obj = function () {
+
+ this.a = 5;
+ };
+
+ Obj.prototype.b = function () { return 'c'; };
+
+ var a = new Obj();
+ var b = Hoek.clone(a);
+
+ expect(b.a).to.equal(5);
+ expect(b.b()).to.equal('c');
+ expect(a).to.deep.equal(b);
+ done();
+ });
+
+ it('reuses cloned Date object', function (done) {
+
+ var obj = {
+ a: new Date()
+ };
+
+ obj.b = obj.a;
+
+ var copy = Hoek.clone(obj);
+ expect(copy.a).to.equal(copy.b);
+ done();
+ });
+
+ it('shallow copies an object with a prototype and isImmutable flag', function (done) {
+
+ var Obj = function () {
+
+ this.value = 5;
+ };
+
+ Obj.prototype.b = function () { return 'c'; };
+ Obj.prototype.isImmutable = true;
+
+ var obj = {
+ a: new Obj()
+ };
+
+ var copy = Hoek.clone(obj);
+
+ expect(obj.a.value).to.equal(5);
+ expect(copy.a.value).to.equal(5);
+ expect(copy.a.b()).to.equal('c');
+ expect(obj.a).to.equal(copy.a);
+ done();
+ });
+
+ it('clones an object with property getter without executing it', function (done) {
+
+ var obj = {};
+ var value = 1;
+ var execCount = 0;
+
+ Object.defineProperty(obj, 'test', {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+
+ ++execCount;
+ return value;
+ }
+ });
+
+ var copy = Hoek.clone(obj);
+ expect(execCount).to.equal(0);
+ expect(copy.test).to.equal(1);
+ expect(execCount).to.equal(1);
+ done();
+ });
+
+ it('clones an object with property getter and setter', function (done) {
+
+ var obj = {
+ _test: 0
+ };
+
+ Object.defineProperty(obj, 'test', {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+
+ return this._test;
+ },
+ 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();
+ });
+
+ it('clones an object with only property setter', function (done) {
+
+ var obj = {
+ _test: 0
+ };
+
+ Object.defineProperty(obj, 'test', {
+ enumerable: true,
+ 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 () {
+
+ it('deep copies source items', function (done) {
+
+ var target = {
+ b: 3,
+ d: []
+ };
+
+ var source = {
+ c: {
+ d: 1
+ },
+ d: [{ e: 1 }]
+ };
+
+ Hoek.merge(target, source);
+ expect(target.c).to.not.equal(source.c);
+ expect(target.c).to.deep.equal(source.c);
+ expect(target.d).to.not.equal(source.d);
+ expect(target.d[0]).to.not.equal(source.d[0]);
+ expect(target.d).to.deep.equal(source.d);
+ done();
+ });
+
+ it('merges array over an object', function (done) {
+
+ var a = {
+ x: ['n', 'm']
+ };
+
+ var b = {
+ x: {
+ n: '1',
+ m: '2'
+ }
+ };
+
+ Hoek.merge(b, a);
+ expect(a.x[0]).to.equal('n');
+ expect(a.x.n).to.not.exist();
+ done();
+ });
+
+ it('merges object over an array', function (done) {
+
+ var a = {
+ x: ['n', 'm']
+ };
+
+ var b = {
+ x: {
+ n: '1',
+ m: '2'
+ }
+ };
+
+ Hoek.merge(a, b);
+ expect(a.x.n).to.equal('1');
+ expect(a.x[0]).to.not.exist();
+ done();
+ });
+
+ it('does not throw if source is null', function (done) {
+
+ var a = {};
+ var b = null;
+ var c = null;
+
+ expect(function () {
+
+ c = Hoek.merge(a, b);
+ }).to.not.throw();
+
+ expect(c).to.equal(a);
+ done();
+ });
+
+ it('does not throw if source is undefined', function (done) {
+
+ var a = {};
+ var b;
+ var c = null;
+
+ expect(function () {
+
+ c = Hoek.merge(a, b);
+ }).to.not.throw();
+
+ expect(c).to.equal(a);
+ done();
+ });
+
+ it('throws if source is not an object', function (done) {
+
+ expect(function () {
+
+ var a = {};
+ var b = 0;
+
+ Hoek.merge(a, b);
+ }).to.throw('Invalid source value: must be null, undefined, or an object');
+ done();
+ });
+
+ it('throws if target is not an object', function (done) {
+
+ expect(function () {
+
+ var a = 0;
+ var b = {};
+
+ Hoek.merge(a, b);
+ }).to.throw('Invalid target value: must be an object');
+ done();
+ });
+
+ it('throws if target is not an array and source is', function (done) {
+
+ expect(function () {
+
+ var a = {};
+ var b = [1, 2];
+
+ Hoek.merge(a, b);
+ }).to.throw('Cannot merge array onto an object');
+ done();
+ });
+
+ it('returns the same object when merging arrays', function (done) {
+
+ var a = [];
+ var b = [1, 2];
+
+ expect(Hoek.merge(a, b)).to.equal(a);
+ done();
+ });
+
+ it('combines an empty object with a non-empty object', function (done) {
+
+ var a = {};
+ var b = nestedObj;
+
+ var c = Hoek.merge(a, b);
+ expect(a).to.deep.equal(b);
+ expect(c).to.deep.equal(b);
+ done();
+ });
+
+ it('overrides values in target', function (done) {
+
+ var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' };
+ var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' };
+
+ var c = Hoek.merge(a, b);
+ expect(c.x).to.equal(null);
+ expect(c.y).to.equal(2);
+ expect(c.z).to.equal(4);
+ expect(c.v).to.equal(0);
+ expect(c.m).to.equal('123');
+ expect(c.t).to.deep.equal({ u: 6 });
+ done();
+ });
+
+ it('overrides values in target (flip)', function (done) {
+
+ var a = { x: 1, y: 2, z: 3, v: 5, t: 'test', m: 'abc' };
+ var b = { x: null, z: 4, v: 0, t: { u: 6 }, m: '123' };
+
+ var d = Hoek.merge(b, a);
+ expect(d.x).to.equal(1);
+ expect(d.y).to.equal(2);
+ expect(d.z).to.equal(3);
+ expect(d.v).to.equal(5);
+ expect(d.m).to.equal('abc');
+ expect(d.t).to.deep.equal('test');
+ done();
+ });
+
+ it('retains Date properties', function (done) {
+
+ var a = { x: new Date(1378776452757) };
+
+ var b = Hoek.merge({}, a);
+ expect(a.x.getTime()).to.equal(b.x.getTime());
+ done();
+ });
+
+ it('retains Date properties when merging keys', function (done) {
+
+ var a = { x: new Date(1378776452757) };
+
+ var b = Hoek.merge({ x: {} }, a);
+ expect(a.x.getTime()).to.equal(b.x.getTime());
+ done();
+ });
+
+ it('overrides Buffer', function (done) {
+
+ var a = { x: new Buffer('abc') };
+
+ var b = Hoek.merge({ x: {} }, a);
+ expect(a.x.toString()).to.equal('abc');
+ done();
+ });
+});
+
+describe('applyToDefaults()', function () {
+
+ var defaults = {
+ a: 1,
+ b: 2,
+ c: {
+ d: 3,
+ e: [5, 6]
+ },
+ f: 6,
+ g: 'test'
+ };
+
+ it('throws when target is null', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaults(null, {});
+ }).to.throw('Invalid defaults value: must be an object');
+ done();
+ });
+
+ it('returns null if options is false', function (done) {
+
+ var result = Hoek.applyToDefaults(defaults, false);
+ expect(result).to.equal(null);
+ done();
+ });
+
+ it('returns null if options is null', function (done) {
+
+ var result = Hoek.applyToDefaults(defaults, null);
+ expect(result).to.equal(null);
+ done();
+ });
+
+ it('returns null if options is undefined', function (done) {
+
+ var result = Hoek.applyToDefaults(defaults, undefined);
+ expect(result).to.equal(null);
+ done();
+ });
+
+ it('returns a copy of defaults if options is true', function (done) {
+
+ var result = Hoek.applyToDefaults(defaults, true);
+ expect(result).to.deep.equal(defaults);
+ done();
+ });
+
+ it('applies object to defaults', function (done) {
+
+ var obj = {
+ a: null,
+ c: {
+ e: [4]
+ },
+ f: 0,
+ g: {
+ h: 5
+ }
+ };
+
+ var result = Hoek.applyToDefaults(defaults, obj);
+ expect(result.c.e).to.deep.equal([4]);
+ expect(result.a).to.equal(1);
+ expect(result.b).to.equal(2);
+ expect(result.f).to.equal(0);
+ expect(result.g).to.deep.equal({ h: 5 });
+ done();
+ });
+});
+
+describe('cloneWithShallow()', function () {
+
+ it('deep clones except for listed keys', function (done) {
+
+ var source = {
+ a: {
+ b: 5
+ },
+ c: {
+ d: 6
+ }
+ };
+
+ var copy = Hoek.cloneWithShallow(source, ['c']);
+ expect(copy).to.deep.equal(source);
+ expect(copy).to.not.equal(source);
+ expect(copy.a).to.not.equal(source.a);
+ expect(copy.b).to.equal(source.b);
+ done();
+ });
+
+ it('returns immutable value', function (done) {
+
+ expect(Hoek.cloneWithShallow(5)).to.equal(5);
+ done();
+ });
+
+ it('returns null value', function (done) {
+
+ expect(Hoek.cloneWithShallow(null)).to.equal(null);
+ done();
+ });
+
+ it('returns undefined value', function (done) {
+
+ expect(Hoek.cloneWithShallow(undefined)).to.equal(undefined);
+ done();
+ });
+
+ it('deep clones except for listed keys (including missing keys)', function (done) {
+
+ var source = {
+ a: {
+ b: 5
+ },
+ c: {
+ d: 6
+ }
+ };
+
+ var copy = Hoek.cloneWithShallow(source, ['c', 'v']);
+ expect(copy).to.deep.equal(source);
+ expect(copy).to.not.equal(source);
+ expect(copy.a).to.not.equal(source.a);
+ expect(copy.b).to.equal(source.b);
+ done();
+ });
+});
+
+describe('applyToDefaultsWithShallow()', function () {
+
+ it('shallow copies the listed keys from options without merging', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5,
+ e: 3
+ },
+ c: {
+ d: 7,
+ g: 1
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ d: 6,
+ f: 7
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['a']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { d: 6, g: 1, f: 7 } });
+ expect(merged.a).to.equal(options.a);
+ expect(merged.a).to.not.equal(defaults.a);
+ expect(merged.c).to.not.equal(options.c);
+ expect(merged.c).to.not.equal(defaults.c);
+ done();
+ });
+
+ it('shallow copies the nested keys (override)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5
+ },
+ c: {
+ d: 7,
+ g: 1
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ d: 6,
+ g: {
+ h: 8
+ }
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { d: 6, g: { h: 8 } } });
+ expect(merged.c.g).to.equal(options.c.g);
+ done();
+ });
+
+ it('shallow copies the nested keys (missing)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ g: {
+ h: 8
+ }
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { h: 8 } } });
+ expect(merged.c.g).to.equal(options.c.g);
+ done();
+ });
+
+ it('shallow copies the nested keys (override)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5
+ },
+ c: {
+ g: {
+ d: 7
+ }
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ g: {
+ h: 8
+ }
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { h: 8 } } });
+ expect(merged.c.g).to.equal(options.c.g);
+ done();
+ });
+
+ it('shallow copies the nested keys (deeper)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ g: {
+ r: {
+ h: 8
+ }
+ }
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['c.g.r']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { r: { h: 8 } } } });
+ expect(merged.c.g.r).to.equal(options.c.g.r);
+ done();
+ });
+
+ it('shallow copies the nested keys (not present)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 5
+ }
+ };
+
+ var options = {
+ a: {
+ b: 4
+ },
+ c: {
+ g: {
+ r: {
+ h: 8
+ }
+ }
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, options, ['x.y']);
+ expect(merged).to.deep.equal({ a: { b: 4 }, c: { g: { r: { h: 8 } } } });
+ done();
+ });
+
+ it('shallow copies the listed keys in the defaults', function (done) {
+
+ var defaults = {
+ a: {
+ b: 1
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, {}, ['a']);
+ expect(merged.a).to.equal(defaults.a);
+ done();
+ });
+
+ it('shallow copies the listed keys in the defaults (true)', function (done) {
+
+ var defaults = {
+ a: {
+ b: 1
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, true, ['a']);
+ expect(merged.a).to.equal(defaults.a);
+ done();
+ });
+
+ it('returns null on false', function (done) {
+
+ var defaults = {
+ a: {
+ b: 1
+ }
+ };
+
+ var merged = Hoek.applyToDefaultsWithShallow(defaults, false, ['a']);
+ expect(merged).to.equal(null);
+ done();
+ });
+
+ it('throws on missing defaults', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaultsWithShallow(null, {}, ['a']);
+ }).to.throw('Invalid defaults value: must be an object');
+ done();
+ });
+
+ it('throws on invalid defaults', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaultsWithShallow('abc', {}, ['a']);
+ }).to.throw('Invalid defaults value: must be an object');
+ done();
+ });
+
+ it('throws on invalid options', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaultsWithShallow({}, 'abc', ['a']);
+ }).to.throw('Invalid options value: must be true, falsy or an object');
+ done();
+ });
+
+ it('throws on missing keys', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaultsWithShallow({}, true);
+ }).to.throw('Invalid keys');
+ done();
+ });
+
+ it('throws on invalid keys', function (done) {
+
+ expect(function () {
+
+ Hoek.applyToDefaultsWithShallow({}, true, 'a');
+ }).to.throw('Invalid keys');
+ done();
+ });
+});
+
+describe('deepEqual()', function () {
+
+ it('compares simple values', function (done) {
+
+ expect(Hoek.deepEqual('x', 'x')).to.be.true();
+ expect(Hoek.deepEqual('x', 'y')).to.be.false();
+ expect(Hoek.deepEqual('x1', 'x')).to.be.false();
+ expect(Hoek.deepEqual(-0, +0)).to.be.false();
+ expect(Hoek.deepEqual(-0, -0)).to.be.true();
+ expect(Hoek.deepEqual(+0, +0)).to.be.true();
+ expect(Hoek.deepEqual(+0, -0)).to.be.false();
+ expect(Hoek.deepEqual(1, 1)).to.be.true();
+ expect(Hoek.deepEqual(0, 0)).to.be.true();
+ expect(Hoek.deepEqual(-1, 1)).to.be.false();
+ expect(Hoek.deepEqual(NaN, 0)).to.be.false();
+ expect(Hoek.deepEqual(NaN, NaN)).to.be.true();
+ done();
+ });
+
+ it('compares different types', function (done) {
+
+ expect(Hoek.deepEqual([], 5)).to.be.false();
+ expect(Hoek.deepEqual(5, [])).to.be.false();
+ expect(Hoek.deepEqual({}, null)).to.be.false();
+ expect(Hoek.deepEqual(null, {})).to.be.false();
+ expect(Hoek.deepEqual('abc', {})).to.be.false();
+ expect(Hoek.deepEqual({}, 'abc')).to.be.false();
+ done();
+ });
+
+ it('compares empty structures', function (done) {
+
+ expect(Hoek.deepEqual([], [])).to.be.true();
+ expect(Hoek.deepEqual({}, {})).to.be.true();
+ expect(Hoek.deepEqual([], {})).to.be.false();
+ done();
+ });
+
+ it('compares empty arguments object', function (done) {
+
+ var compare = function () {
+
+ expect(Hoek.deepEqual([], arguments)).to.be.false();
+ };
+
+ compare();
+ done();
+ });
+
+ it('compares empty arguments objects', function (done) {
+
+ var compare = function () {
+
+ var arg1 = arguments;
+
+ var inner = function () {
+
+ expect(Hoek.deepEqual(arg1, arguments)).to.be.true();
+ };
+
+ inner();
+ };
+
+ compare();
+ done();
+ });
+
+ it('compares dates', function (done) {
+
+ expect(Hoek.deepEqual(new Date(), new Date())).to.be.true();
+ expect(Hoek.deepEqual(new Date(100), new Date(101))).to.be.false();
+ expect(Hoek.deepEqual(new Date(), {})).to.be.false();
+ done();
+ });
+
+ it('compares regular expressions', function (done) {
+
+ expect(Hoek.deepEqual(/\s/, new RegExp('\\\s'))).to.be.true();
+ expect(Hoek.deepEqual(/\s/g, /\s/g)).to.be.true();
+ expect(Hoek.deepEqual(/a/, {})).to.be.false();
+ expect(Hoek.deepEqual(/\s/g, /\s/i)).to.be.false();
+ expect(Hoek.deepEqual(/a/g, /b/g)).to.be.false();
+ done();
+ });
+
+ it('compares arrays', function (done) {
+
+ expect(Hoek.deepEqual([[1]], [[1]])).to.be.true();
+ expect(Hoek.deepEqual([1, 2, 3], [1, 2, 3])).to.be.true();
+ expect(Hoek.deepEqual([1, 2, 3], [1, 3, 2])).to.be.false();
+ expect(Hoek.deepEqual([1, 2, 3], [1, 2])).to.be.false();
+ expect(Hoek.deepEqual([1], [1])).to.be.true();
+ done();
+ });
+
+ it('compares buffers', function (done) {
+
+ expect(Hoek.deepEqual(new Buffer([1, 2, 3]), new Buffer([1, 2, 3]))).to.be.true();
+ expect(Hoek.deepEqual(new Buffer([1, 2, 3]), new Buffer([1, 3, 2]))).to.be.false();
+ expect(Hoek.deepEqual(new Buffer([1, 2, 3]), new Buffer([1, 2]))).to.be.false();
+ expect(Hoek.deepEqual(new Buffer([1, 2, 3]), {})).to.be.false();
+ expect(Hoek.deepEqual(new Buffer([1, 2, 3]), [1, 2, 3])).to.be.false();
+ done();
+ });
+
+ it('compares objects', function (done) {
+
+ expect(Hoek.deepEqual({ a: 1, b: 2, c: 3 }, { a: 1, b: 2, c: 3 })).to.be.true();
+ expect(Hoek.deepEqual({ foo: 'bar' }, { foo: 'baz' })).to.be.false();
+ expect(Hoek.deepEqual({ foo: { bar: 'foo' } }, { foo: { bar: 'baz' } })).to.be.false();
+ done();
+ });
+
+ it('handles circular dependency', function (done) {
+
+ var a = {};
+ a.x = a;
+
+ var b = Hoek.clone(a);
+ expect(Hoek.deepEqual(a, b)).to.be.true();
+ done();
+ });
+
+ it('compares an object with property getter without executing it', function (done) {
+
+ var obj = {};
+ var value = 1;
+ var execCount = 0;
+
+ Object.defineProperty(obj, 'test', {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+
+ ++execCount;
+ return value;
+ }
+ });
+
+ var copy = Hoek.clone(obj);
+ expect(Hoek.deepEqual(obj, copy)).to.be.true();
+ expect(execCount).to.equal(0);
+ expect(copy.test).to.equal(1);
+ expect(execCount).to.equal(1);
+ done();
+ });
+
+ it('compares objects with property getters', function (done) {
+
+ var obj = {};
+ Object.defineProperty(obj, 'test', {
+ enumerable: true,
+ configurable: true,
+ get: function () { return 1; }
+ });
+
+ var ref = {};
+ Object.defineProperty(ref, 'test', {
+ enumerable: true,
+ configurable: true,
+ get: function () { return 2; }
+ });
+
+ expect(Hoek.deepEqual(obj, ref)).to.be.false();
+ done();
+ });
+
+ it('compares object prototypes', function (done) {
+
+ var Obj = function () {
+
+ this.a = 5;
+ };
+
+ Obj.prototype.b = function () { return this.a; };
+
+ var Ref = function () {
+
+ this.a = 5;
+ };
+
+ Ref.prototype.b = function () { return this.a; };
+
+ expect(Hoek.deepEqual(new Obj(), new Ref())).to.be.false();
+ expect(Hoek.deepEqual(new Obj(), new Obj())).to.be.true();
+ expect(Hoek.deepEqual(new Ref(), new Ref())).to.be.true();
+ done();
+ });
+
+ it('compares plain objects', function (done) {
+
+ var a = Object.create(null);
+ var b = Object.create(null);
+
+ a.b = 'c';
+ b.b = 'c';
+
+ expect(Hoek.deepEqual(a, b)).to.be.true();
+ expect(Hoek.deepEqual(a, { b: 'c' })).to.be.false();
+ done();
+ });
+});
+
+describe('unique()', function () {
+
+ it('ensures uniqueness within array of objects based on subkey', function (done) {
+
+ var a = Hoek.unique(dupsArray, 'x');
+ expect(a).to.deep.equal(reducedDupsArray);
+ done();
+ });
+
+ it('removes duplicated without key', function (done) {
+
+ expect(Hoek.unique([1, 2, 3, 4, 2, 1, 5])).to.deep.equal([1, 2, 3, 4, 5]);
+ done();
+ });
+});
+
+describe('mapToObject()', function () {
+
+ it('returns null on null array', function (done) {
+
+ var a = Hoek.mapToObject(null);
+ expect(a).to.equal(null);
+ done();
+ });
+
+ it('converts basic array to existential object', function (done) {
+
+ var keys = [1, 2, 3, 4];
+ var a = Hoek.mapToObject(keys);
+ for (var i in keys) {
+ expect(a[keys[i]]).to.equal(true);
+ }
+ done();
+ });
+
+ it('converts array of objects to existential object', function (done) {
+
+ var keys = [{ x: 1 }, { x: 2 }, { x: 3 }, { y: 4 }];
+ var subkey = 'x';
+ var a = Hoek.mapToObject(keys, subkey);
+ expect(a).to.deep.equal({ 1: true, 2: true, 3: true });
+ done();
+ });
+});
+
+describe('intersect()', function () {
+
+ it('returns the common objects of two arrays', function (done) {
+
+ var array1 = [1, 2, 3, 4, 4, 5, 5];
+ var array2 = [5, 4, 5, 6, 7];
+ var common = Hoek.intersect(array1, array2);
+ expect(common.length).to.equal(2);
+ done();
+ });
+
+ it('returns just the first common object of two arrays', function (done) {
+
+ var array1 = [1, 2, 3, 4, 4, 5, 5];
+ var array2 = [5, 4, 5, 6, 7];
+ var common = Hoek.intersect(array1, array2, true);
+ expect(common).to.equal(5);
+ done();
+ });
+
+ it('returns null when no common and returning just the first common object of two arrays', function (done) {
+
+ var array1 = [1, 2, 3, 4, 4, 5, 5];
+ var array2 = [6, 7];
+ var common = Hoek.intersect(array1, array2, true);
+ expect(common).to.equal(null);
+ done();
+ });
+
+ it('returns an empty array if either input is null', function (done) {
+
+ expect(Hoek.intersect([1], null).length).to.equal(0);
+ expect(Hoek.intersect(null, [1]).length).to.equal(0);
+ done();
+ });
+
+ it('returns the common objects of object and array', function (done) {
+
+ var array1 = [1, 2, 3, 4, 4, 5, 5];
+ var array2 = [5, 4, 5, 6, 7];
+ var common = Hoek.intersect(Hoek.mapToObject(array1), array2);
+ expect(common.length).to.equal(2);
+ done();
+ });
+});
+
+describe('contain()', function () {
+
+ it('tests strings', function (done) {
+
+ expect(Hoek.contain('abc', 'ab')).to.be.true();
+ expect(Hoek.contain('abc', 'abc', { only: true })).to.be.true();
+ expect(Hoek.contain('aaa', 'a', { only: true })).to.be.true();
+ expect(Hoek.contain('abc', 'b', { once: true })).to.be.true();
+ expect(Hoek.contain('abc', ['a', 'c'])).to.be.true();
+ expect(Hoek.contain('abc', ['a', 'd'], { part: true })).to.be.true();
+
+ expect(Hoek.contain('abc', 'ac')).to.be.false();
+ expect(Hoek.contain('abcd', 'abc', { only: true })).to.be.false();
+ expect(Hoek.contain('aab', 'a', { only: true })).to.be.false();
+ expect(Hoek.contain('abb', 'b', { once: true })).to.be.false();
+ expect(Hoek.contain('abc', ['a', 'd'])).to.be.false();
+ expect(Hoek.contain('abc', ['ab', 'bc'])).to.be.false(); // Overlapping values not supported
+ done();
+ });
+
+ it('tests arrays', function (done) {
+
+ expect(Hoek.contain([1, 2, 3], 1)).to.be.true();
+ expect(Hoek.contain([{ a: 1 }], { a: 1 }, { deep: true })).to.be.true();
+ expect(Hoek.contain([1, 2, 3], [1, 2])).to.be.true();
+ expect(Hoek.contain([{ a: 1 }], [{ a: 1 }], { deep: true })).to.be.true();
+ expect(Hoek.contain([1, 1, 2], [1, 2], { only: true })).to.be.true();
+ expect(Hoek.contain([1, 2], [1, 2], { once: true })).to.be.true();
+ expect(Hoek.contain([1, 2, 3], [1, 4], { part: true })).to.be.true();
+ expect(Hoek.contain([[1], [2]], [[1]], { deep: true })).to.be.true();
+
+ expect(Hoek.contain([1, 2, 3], 4)).to.be.false();
+ expect(Hoek.contain([{ a: 1 }], { a: 2 }, { deep: true })).to.be.false();
+ expect(Hoek.contain([{ a: 1 }], { a: 1 })).to.be.false();
+ expect(Hoek.contain([1, 2, 3], [4, 5])).to.be.false();
+ expect(Hoek.contain([[3], [2]], [[1]])).to.be.false();
+ expect(Hoek.contain([[1], [2]], [[1]])).to.be.false();
+ expect(Hoek.contain([{ a: 1 }], [{ a: 2 }], { deep: true })).to.be.false();
+ expect(Hoek.contain([1, 3, 2], [1, 2], { only: true })).to.be.false();
+ expect(Hoek.contain([1, 2, 2], [1, 2], { once: true })).to.be.false();
+ expect(Hoek.contain([0, 2, 3], [1, 4], { part: true })).to.be.false();
+ done();
+ });
+
+ it('tests objects', function (done) {
+
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, 'a')).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, ['a', 'c'])).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, ['a', 'b', 'c'], { only: true })).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1 })).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, c: 3 })).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 4 }, { part: true })).to.be.true();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, b: 2, c: 3 }, { only: true })).to.be.true();
+ expect(Hoek.contain({ a: [1], b: [2], c: [3] }, { a: [1], c: [3] }, { deep: true })).to.be.true();
+
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, 'd')).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, ['a', 'd'])).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3, d: 4 }, ['a', 'b', 'c'], { only: true })).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 2 })).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 2, b: 2 }, { part: true })).to.be.false(); // part does not ignore bad value
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 3 })).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, d: 4 })).to.be.false();
+ expect(Hoek.contain({ a: 1, b: 2, c: 3 }, { a: 1, b: 2 }, { only: true })).to.be.false();
+ expect(Hoek.contain({ a: [1], b: [2], c: [3] }, { a: [1], c: [3] })).to.be.false();
+ done();
+ });
+});
+
+describe('flatten()', function () {
+
+ it('returns a flat array', function (done) {
+
+ var result = Hoek.flatten([1, 2, [3, 4, [5, 6], [7], 8], [9], [10, [11, 12]], 13]);
+ expect(result.length).to.equal(13);
+ expect(result).to.deep.equal([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]);
+ done();
+ });
+});
+
+describe('reach()', function () {
+
+ var obj = {
+ a: {
+ b: {
+ c: {
+ d: 1,
+ e: 2
+ },
+ f: 'hello'
+ },
+ g: {
+ h: 3
+ }
+ },
+ i: function () { },
+ j: null,
+ k: [4, 8, 9, 1]
+ };
+
+ obj.i.x = 5;
+
+ it('returns first value of array', function (done) {
+
+ expect(Hoek.reach(obj, 'k.0')).to.equal(4);
+ done();
+ });
+
+ it('returns last value of array using negative index', function (done) {
+
+ expect(Hoek.reach(obj, 'k.-2')).to.equal(9);
+ done();
+ });
+
+ it('returns a valid member', function (done) {
+
+ expect(Hoek.reach(obj, 'a.b.c.d')).to.equal(1);
+ done();
+ });
+
+ it('returns a valid member with separator override', function (done) {
+
+ expect(Hoek.reach(obj, 'a/b/c/d', '/')).to.equal(1);
+ done();
+ });
+
+ it('returns undefined on null object', function (done) {
+
+ expect(Hoek.reach(null, 'a.b.c.d')).to.equal(undefined);
+ done();
+ });
+
+ it('returns undefined on missing object member', function (done) {
+
+ expect(Hoek.reach(obj, 'a.b.c.d.x')).to.equal(undefined);
+ done();
+ });
+
+ it('returns undefined on missing function member', function (done) {
+
+ expect(Hoek.reach(obj, 'i.y', { functions: true })).to.equal(undefined);
+ done();
+ });
+
+ it('throws on missing member in strict mode', function (done) {
+
+ expect(function () {
+
+ Hoek.reach(obj, 'a.b.c.o.x', { strict: true });
+ }).to.throw('Missing segment o in reach path a.b.c.o.x');
+
+ done();
+ });
+
+ it('returns undefined on invalid member', function (done) {
+
+ expect(Hoek.reach(obj, 'a.b.c.d-.x')).to.equal(undefined);
+ done();
+ });
+
+ it('returns function member', function (done) {
+
+ expect(typeof Hoek.reach(obj, 'i')).to.equal('function');
+ done();
+ });
+
+ it('returns function property', function (done) {
+
+ expect(Hoek.reach(obj, 'i.x')).to.equal(5);
+ done();
+ });
+
+ it('returns null', function (done) {
+
+ expect(Hoek.reach(obj, 'j')).to.equal(null);
+ done();
+ });
+
+ it('throws on function property when functions not allowed', function (done) {
+
+ expect(function () {
+
+ Hoek.reach(obj, 'i.x', { functions: false });
+ }).to.throw('Invalid segment x in reach path i.x');
+
+ done();
+ });
+
+ it('will return a default value if property is not found', function (done) {
+
+ expect(Hoek.reach(obj, 'a.b.q', { default: 'defaultValue' })).to.equal('defaultValue');
+ done();
+ });
+
+ it('will return a default value if path is not found', function (done) {
+
+ expect(Hoek.reach(obj, 'q', { default: 'defaultValue' })).to.equal('defaultValue');
+ done();
+ });
+
+ it('allows a falsey value to be used as the default value', function (done) {
+
+ expect(Hoek.reach(obj, 'q', { default: '' })).to.equal('');
+ done();
+ });
+});
+
+describe('callStack()', function () {
+
+ it('returns the full call stack', function (done) {
+
+ var stack = Hoek.callStack();
+ expect(stack[0][0]).to.contain('index.js');
+ expect(stack[0][2]).to.equal(26);
+ done();
+ });
+});
+
+describe('displayStack ()', function () {
+
+ it('returns the full call stack for display', function (done) {
+
+ var stack = Hoek.displayStack();
+ expect(stack[0]).to.contain(Path.normalize('/test/index.js') + ':');
+ done();
+ });
+
+ it('includes constructor functions correctly', function (done) {
+
+ var Something = function (next) {
+
+ next();
+ };
+
+ var something = new Something(function () {
+
+ var stack = Hoek.displayStack();
+ expect(stack[1]).to.contain('new Something');
+ done();
+ });
+ });
+});
+
+describe('abort()', function () {
+
+ it('exits process when not in test mode', function (done) {
+
+ var env = process.env.NODE_ENV;
+ var write = process.stdout.write;
+ var exit = process.exit;
+
+ process.env.NODE_ENV = 'nottatest';
+ process.stdout.write = function () { };
+ process.exit = function (state) {
+
+ process.exit = exit;
+ process.env.NODE_ENV = env;
+ process.stdout.write = write;
+
+ expect(state).to.equal(1);
+ done();
+ };
+
+ Hoek.abort('Boom');
+ });
+
+ it('throws when not in test mode and abortThrow is true', function (done) {
+
+ var env = process.env.NODE_ENV;
+ process.env.NODE_ENV = 'nottatest';
+ Hoek.abortThrow = true;
+
+ var fn = function () {
+
+ Hoek.abort('my error message');
+ };
+
+ expect(fn).to.throw('my error message');
+ Hoek.abortThrow = false;
+ process.env.NODE_ENV = env;
+
+ done();
+ });
+
+ it('respects hideStack argument', function (done) {
+
+ var env = process.env.NODE_ENV;
+ var write = process.stdout.write;
+ var exit = process.exit;
+ var output = '';
+
+ process.exit = function () { };
+ process.env.NODE_ENV = '';
+ process.stdout.write = function (message) {
+
+ output = message;
+ };
+
+ Hoek.abort('my error message', true);
+
+ process.env.NODE_ENV = env;
+ process.stdout.write = write;
+ process.exit = exit;
+
+ expect(output).to.equal('ABORT: my error message\n\t\n');
+
+ done();
+ });
+
+ it('throws in test mode', function (done) {
+
+ var env = process.env.NODE_ENV;
+ process.env.NODE_ENV = 'test';
+
+ expect(function () {
+
+ Hoek.abort('my error message', true);
+ }).to.throw('my error message');
+
+ process.env.NODE_ENV = env;
+ done();
+ });
+
+ it('throws in test mode with default message', function (done) {
+
+ var env = process.env.NODE_ENV;
+ process.env.NODE_ENV = 'test';
+
+ expect(function () {
+
+ Hoek.abort('', true);
+ }).to.throw('Unknown error');
+
+ process.env.NODE_ENV = env;
+ done();
+ });
+
+ it('defaults to showing stack', function (done) {
+
+ var env = process.env.NODE_ENV;
+ var write = process.stdout.write;
+ var exit = process.exit;
+ var output = '';
+
+ process.exit = function () { };
+ process.env.NODE_ENV = '';
+ process.stdout.write = function (message) {
+
+ output = message;
+ };
+
+ Hoek.abort('my error message');
+
+ process.env.NODE_ENV = env;
+ process.stdout.write = write;
+ process.exit = exit;
+
+ expect(output).to.contain('index.js');
+
+ done();
+ });
+});
+
+describe('assert()', function () {
+
+ it('throws an Error when using assert in a test', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, 'my error message');
+ };
+
+ expect(fn).to.throw('my error message');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with no message', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false);
+ };
+
+ expect(fn).to.throw('Unknown error');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with multipart message', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, 'This', 'is', 'my message');
+ };
+
+ expect(fn).to.throw('This is my message');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with multipart message (empty)', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, 'This', 'is', '', 'my message');
+ };
+
+ expect(fn).to.throw('This is my message');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with object message', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, 'This', 'is', { spinal: 'tap' });
+ };
+
+ expect(fn).to.throw('This is {"spinal":"tap"}');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with multipart string and error messages', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, 'This', 'is', new Error('spinal'), new Error('tap'));
+ };
+
+ expect(fn).to.throw('This is spinal tap');
+ done();
+ });
+
+ it('throws an Error when using assert in a test with error object message', function (done) {
+
+ var fn = function () {
+
+ Hoek.assert(false, new Error('This is spinal tap'));
+ };
+
+ expect(fn).to.throw('This is spinal tap');
+ done();
+ });
+
+ it('throws the same Error that is passed to it if there is only one error passed', function (done) {
+ var error = new Error('ruh roh');
+ var error2 = new Error('ruh roh');
+
+ var fn = function () {
+
+ Hoek.assert(false, error);
+ };
+
+ try {
+ fn();
+ } catch (err) {
+ expect(error).to.equal(error); // should be the same reference
+ expect(error).to.not.equal(error2); // error with the same message should not match
+ }
+
+ done();
+ });
+});
+
+describe('Timer', function () {
+
+ it('returns time elapsed', function (done) {
+
+ var timer = new Hoek.Timer();
+ setTimeout(function () {
+
+ expect(timer.elapsed()).to.be.above(9);
+ done();
+ }, 12);
+ });
+});
+
+describe('Bench', function () {
+
+ it('returns time elapsed', function (done) {
+
+ var timer = new Hoek.Bench();
+ setTimeout(function () {
+
+ expect(timer.elapsed()).to.be.above(9);
+ done();
+ }, 12);
+ });
+});
+
+describe('escapeRegex()', function () {
+
+ it('escapes all special regular expression characters', function (done) {
+
+ var a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,');
+ expect(a).to.equal('4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`"\\(>\\)\\[<\\]d\\{\\}s\\,');
+ done();
+ });
+});
+
+describe('Base64Url', function () {
+
+ var base64str = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn-AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq-wsbKztLW2t7i5uru8vb6_wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t_g4eLj5OXm5-jp6uvs7e7v8PHy8_T19vf4-fr7_P3-_w';
+ var str = unescape('%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20%21%22%23%24%25%26%27%28%29*+%2C-./0123456789%3A%3B%3C%3D%3E%3F@ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D%7E%7F%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A%9B%9C%9D%9E%9F%A0%A1%A2%A3%A4%A5%A6%A7%A8%A9%AA%AB%AC%AD%AE%AF%B0%B1%B2%B3%B4%B5%B6%B7%B8%B9%BA%BB%BC%BD%BE%BF%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D7%D8%D9%DA%DB%DC%DD%DE%DF%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F7%F8%F9%FA%FB%FC%FD%FE%FF');
+
+ describe('base64urlEncode()', function () {
+
+ it('should base64 URL-safe a string', function (done) {
+
+ expect(Hoek.base64urlEncode(str)).to.equal(base64str);
+ done();
+ });
+
+ it('encodes a buffer', function (done) {
+
+ expect(Hoek.base64urlEncode(new Buffer(str, 'binary'))).to.equal(base64str);
+ done();
+ });
+
+ it('should base64 URL-safe a hex string', function (done) {
+
+ var buffer = new Buffer(str, 'binary');
+ expect(Hoek.base64urlEncode(buffer.toString('hex'), 'hex')).to.equal(base64str);
+ done();
+ });
+
+ it('works on larger input strings', function (done) {
+
+ var input = Fs.readFileSync(Path.join(__dirname, 'index.js')).toString();
+ var encoded = Hoek.base64urlEncode(input);
+
+ expect(encoded).to.not.contain('+');
+ expect(encoded).to.not.contain('/');
+
+ var decoded = Hoek.base64urlDecode(encoded);
+
+ expect(decoded).to.equal(input);
+ done();
+ });
+ });
+
+ describe('base64urlDecode()', function () {
+
+ it('should un-base64 URL-safe a string', function (done) {
+
+ expect(Hoek.base64urlDecode(base64str)).to.equal(str);
+ done();
+ });
+
+ it('should un-base64 URL-safe a string into hex', function (done) {
+
+ expect(Hoek.base64urlDecode(base64str, 'hex')).to.equal(new Buffer(str, 'binary').toString('hex'));
+ done();
+ });
+
+ it('should un-base64 URL-safe a string and return a buffer', function (done) {
+
+ var buf = Hoek.base64urlDecode(base64str, 'buffer');
+ expect(buf instanceof Buffer).to.equal(true);
+ expect(buf.toString('binary')).to.equal(str);
+ done();
+ });
+
+ it('returns error on undefined input', function (done) {
+
+ expect(Hoek.base64urlDecode().message).to.exist();
+ done();
+ });
+
+ it('returns error on invalid input', function (done) {
+
+ expect(Hoek.base64urlDecode('*').message).to.exist();
+ done();
+ });
+ });
+});
+
+describe('escapeHeaderAttribute()', function () {
+
+ it('should not alter ascii values', function (done) {
+
+ var a = Hoek.escapeHeaderAttribute('My Value');
+ expect(a).to.equal('My Value');
+ done();
+ });
+
+ it('escapes all special HTTP header attribute characters', function (done) {
+
+ var a = Hoek.escapeHeaderAttribute('I said go!!!#"' + String.fromCharCode(92));
+ expect(a).to.equal('I said go!!!#\\"\\\\');
+ done();
+ });
+
+ it('throws on large unicode characters', function (done) {
+
+ var fn = function () {
+
+ Hoek.escapeHeaderAttribute('this is a test' + String.fromCharCode(500) + String.fromCharCode(300));
+ };
+
+ expect(fn).to.throw(Error);
+ done();
+ });
+
+ it('throws on CRLF to prevent response splitting', function (done) {
+
+ var fn = function () {
+
+ Hoek.escapeHeaderAttribute('this is a test\r\n');
+ };
+
+ expect(fn).to.throw(Error);
+ done();
+ });
+});
+
+describe('escapeHtml()', function () {
+
+ it('escapes all special HTML characters', function (done) {
+
+ var a = Hoek.escapeHtml('&<>"\'`');
+ expect(a).to.equal('&amp;&lt;&gt;&quot;&#x27;&#x60;');
+ done();
+ });
+
+ it('returns empty string on falsy input', function (done) {
+
+ var a = Hoek.escapeHtml('');
+ expect(a).to.equal('');
+ done();
+ });
+
+ it('returns unchanged string on no reserved input', function (done) {
+
+ var a = Hoek.escapeHtml('abc');
+ expect(a).to.equal('abc');
+ done();
+ });
+});
+
+describe('nextTick()', function () {
+
+ it('calls the provided callback on nextTick', function (done) {
+
+ var a = 0;
+
+ var inc = function (step, next) {
+
+ a += step;
+ next();
+ };
+
+ var ticked = Hoek.nextTick(inc);
+
+ ticked(5, function () {
+
+ expect(a).to.equal(6);
+ done();
+ });
+
+ expect(a).to.equal(0);
+ inc(1, function () {
+
+ expect(a).to.equal(1);
+ });
+ });
+});
+
+describe('once()', function () {
+
+ it('allows function to only execute once', function (done) {
+
+ var gen = 0;
+ var add = function (x) {
+
+ gen += x;
+ };
+
+ add(5);
+ expect(gen).to.equal(5);
+ add = Hoek.once(add);
+ add(5);
+ expect(gen).to.equal(10);
+ add(5);
+ expect(gen).to.equal(10);
+ done();
+ });
+
+ it('double once wraps one time', function (done) {
+
+ var method = function () { };
+ method = Hoek.once(method);
+ method.x = 1;
+ method = Hoek.once(method);
+ expect(method.x).to.equal(1);
+ done();
+ });
+});
+
+describe('isAbsoltePath()', function () {
+
+ it('identifies if path is absolute on Unix without node support', { parallel: false }, function (done) {
+
+ var orig = Path.isAbsolute;
+ Path.isAbsolute = undefined;
+
+ expect(Hoek.isAbsolutePath('')).to.equal(false);
+ expect(Hoek.isAbsolutePath('a')).to.equal(false);
+ expect(Hoek.isAbsolutePath('./a')).to.equal(false);
+ expect(Hoek.isAbsolutePath('/a')).to.equal(true);
+ expect(Hoek.isAbsolutePath('/')).to.equal(true);
+
+ Path.isAbsolute = orig;
+
+ done();
+ });
+
+ it('identifies if path is absolute with fake node support', { parallel: false }, function (done) {
+
+ var orig = Path.isAbsolute;
+ Path.isAbsolute = function (path) { return path[0] === '/'; };
+
+ expect(Hoek.isAbsolutePath('', 'linux')).to.equal(false);
+ expect(Hoek.isAbsolutePath('a', 'linux')).to.equal(false);
+ expect(Hoek.isAbsolutePath('./a', 'linux')).to.equal(false);
+ expect(Hoek.isAbsolutePath('/a', 'linux')).to.equal(true);
+ expect(Hoek.isAbsolutePath('/', 'linux')).to.equal(true);
+
+ Path.isAbsolute = orig;
+
+ done();
+ });
+
+ it('identifies if path is absolute on Windows without node support', { parallel: false }, function (done) {
+
+ var orig = Path.isAbsolute;
+ Path.isAbsolute = undefined;
+
+ expect(Hoek.isAbsolutePath('//server/file', 'win32')).to.equal(true);
+ expect(Hoek.isAbsolutePath('//server/file', 'win32')).to.equal(true);
+ expect(Hoek.isAbsolutePath('\\\\server\\file', 'win32')).to.equal(true);
+ expect(Hoek.isAbsolutePath('C:/Users/', 'win32')).to.equal(true);
+ expect(Hoek.isAbsolutePath('C:\\Users\\', 'win32')).to.equal(true);
+ expect(Hoek.isAbsolutePath('C:cwd/another', 'win32')).to.equal(false);
+ expect(Hoek.isAbsolutePath('C:cwd\\another', 'win32')).to.equal(false);
+ expect(Hoek.isAbsolutePath('directory/directory', 'win32')).to.equal(false);
+ expect(Hoek.isAbsolutePath('directory\\directory', 'win32')).to.equal(false);
+
+ Path.isAbsolute = orig;
+
+ done();
+ });
+});
+
+describe('isInteger()', function () {
+
+ it('validates integers', function (done) {
+
+ expect(Hoek.isInteger(0)).to.equal(true);
+ expect(Hoek.isInteger(1)).to.equal(true);
+ expect(Hoek.isInteger(1394035612500)).to.equal(true);
+ expect(Hoek.isInteger('0')).to.equal(false);
+ expect(Hoek.isInteger(1.0)).to.equal(true);
+ expect(Hoek.isInteger(1.1)).to.equal(false);
+ done();
+ });
+});
+
+describe('ignore()', function () {
+
+ it('exists', function (done) {
+
+ expect(Hoek.ignore).to.exist();
+ expect(typeof Hoek.ignore).to.equal('function');
+ done();
+ });
+});
+
+describe('inherits()', function () {
+
+ it('exists', function (done) {
+
+ expect(Hoek.inherits).to.exist();
+ expect(typeof Hoek.inherits).to.equal('function');
+ done();
+ });
+});
+
+describe('format()', function () {
+
+ it('exists', function (done) {
+
+ expect(Hoek.format).to.exist();
+ expect(typeof Hoek.format).to.equal('function');
+ done();
+ });
+
+ it('is a reference to Util.format', function (done) {
+
+ expect(Hoek.format('hello %s', 'world')).to.equal('hello world');
+ done();
+ });
+});
+
+describe('transform()', function () {
+
+ var source = {
+ address: {
+ one: '123 main street',
+ two: 'PO Box 1234'
+ },
+ zip: {
+ code: 3321232,
+ province: null
+ },
+ title: 'Warehouse',
+ state: 'CA'
+ };
+
+ it('transforms an object based on the input object', function (done) {
+
+ var result = Hoek.transform(source, {
+ 'person.address.lineOne': 'address.one',
+ 'person.address.lineTwo': 'address.two',
+ 'title': 'title',
+ 'person.address.region': 'state',
+ 'person.address.zip': 'zip.code',
+ 'person.address.location': 'zip.province'
+ });
+
+ expect(result).to.deep.equal({
+ person: {
+ address: {
+ lineOne: '123 main street',
+ lineTwo: 'PO Box 1234',
+ region: 'CA',
+ zip: 3321232,
+ location: null
+ }
+ },
+ title: 'Warehouse'
+ });
+
+ done();
+ });
+
+ it('uses the reach options passed into it', function (done) {
+
+ var schema = {
+ 'person.address.lineOne': 'address-one',
+ 'person.address.lineTwo': 'address-two',
+ 'title': 'title',
+ 'person.address.region': 'state',
+ 'person.prefix': 'person-title',
+ 'person.zip': 'zip-code'
+ };
+ var options = {
+ separator: '-',
+ default: 'unknown'
+ };
+ var result = Hoek.transform(source, schema, options);
+
+ expect(result).to.deep.equal({
+ person: {
+ address: {
+ lineOne: '123 main street',
+ lineTwo: 'PO Box 1234',
+ region: 'CA'
+ },
+ prefix: 'unknown',
+ zip: 3321232
+ },
+ title: 'Warehouse'
+ });
+
+ done();
+ });
+
+ it('works to create shallow objects', function (done) {
+
+ var result = Hoek.transform(source, {
+ lineOne: 'address.one',
+ lineTwo: 'address.two',
+ title: 'title',
+ region: 'state',
+ province: 'zip.province'
+ });
+
+ expect(result).to.deep.equal({
+ lineOne: '123 main street',
+ lineTwo: 'PO Box 1234',
+ title: 'Warehouse',
+ region: 'CA',
+ province: null
+ });
+
+ done();
+ });
+
+ it('only allows strings in the map', function (done) {
+
+ expect(function () {
+ var result = Hoek.transform(source, {
+ lineOne: {}
+ });
+ }).to.throw('All mappings must be "." delineated strings');
+
+ done();
+ });
+
+ it('throws an error on invalid arguments', function (done) {
+
+ expect(function () {
+
+ var result = Hoek.transform(NaN, {});
+ }).to.throw('Invalid source object: must be null, undefined, or an object');
+
+ done();
+ });
+
+ it('is safe to pass null', function (done) {
+
+ var result = Hoek.transform(null, {});
+ expect(result).to.deep.equal({});
+
+ done();
+ });
+
+ it('is safe to pass undefined', function (done) {
+
+ var result = Hoek.transform(undefined, {});
+ expect(result).to.deep.equal({});
+
+ done();
+ });
+});
+
+describe('uniqueFilename()', function () {
+
+ it('generates a random file path', function (done) {
+
+ var result = Hoek.uniqueFilename('./test/modules');
+
+ expect(result).to.exist();
+ expect(result).to.be.a.string();
+ expect(result).to.contain('test/modules');
+ done();
+ });
+
+ it('is random enough to use in fast loops', function (done) {
+
+ var results = [];
+
+ for (var i = 0; i < 10; ++i) {
+ results[i] = Hoek.uniqueFilename('./test/modules');
+ }
+
+ var filter = results.filter(function (item, index, array) {
+
+ return array.indexOf(item) === index;
+ });
+
+ expect(filter.length).to.equal(10);
+ expect(results.length).to.equal(10);
+ done();
+
+ });
+
+ it('combines the random elements with a supplied character', function (done) {
+
+ var result = Hoek.uniqueFilename('./test', 'txt');
+
+ expect(result).to.contain('test/');
+ expect(result).to.contain('.txt');
+
+ done();
+ });
+
+ it('accepts extensions with a "." in it', function (done) {
+
+ var result = Hoek.uniqueFilename('./test', '.mp3');
+
+ expect(result).to.contain('test/');
+ expect(result).to.contain('.mp3');
+
+ done();
+ });
+});
+
+describe('stringify()', function (done) {
+
+ it('converts object to string', function (done) {
+
+ var obj = { a: 1 };
+ expect(Hoek.stringify(obj)).to.equal('{"a":1}');
+ done();
+ });
+
+ it('returns error in result string', function (done) {
+
+ var obj = { a: 1 };
+ obj.b = obj;
+ expect(Hoek.stringify(obj)).to.equal('[Cannot display object: Converting circular structure to JSON]');
+ done();
+ });
+});
+
+describe('shallow()', function (done) {
+
+ it('shallow copies an object', function (done) {
+
+ var obj = {
+ a: 5,
+ b: {
+ c: 6
+ }
+ };
+
+ var shallow = Hoek.shallow(obj);
+ expect(shallow).to.not.equal(obj);
+ expect(shallow).to.deep.equal(obj);
+ expect(shallow.b).to.equal(obj.b);
+ done();
+ });
+});
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/ignore.txt b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/ignore.txt
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/ignore.txt
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js
index 3f41e601e5..fa4e06abe0 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js
@@ -1 +1 @@
-exports.x = 1;
+exports.x = 1;
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js
index 38556b274d..88e9166e86 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js
@@ -1 +1 @@
-exports.y = 2;
+exports.y = 2;
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js
index 436b860b80..670e724a6e 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js
@@ -1 +1 @@
-exports.z = 3;
+exports.z = 3;
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE
index e699a7bdba..b0d877439e 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2012-2013, Eran Hammer.
+Copyright (c) 2012-2014, Eran Hammer and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -8,17 +8,21 @@ modification, are permitted provided that the following conditions are met:
* 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.
- * Neither the name of Eran Hammer nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
+ * The names of any contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 ERAN HAMMER BE LIABLE FOR ANY
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ * * *
+
+The complete list of contributors can be found at: https://github.com/hueniverse/sntp/graphs/contributors
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile
index 9e7138c2a6..417fd93708 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile
@@ -1,11 +1,9 @@
test:
- @./node_modules/.bin/lab
+ @node node_modules/lab/bin/lab
test-cov:
- @./node_modules/.bin/lab -r threshold -t 100
+ @node node_modules/lab/bin/lab -t 100 -m 3000
test-cov-html:
- @./node_modules/.bin/lab -r html -o coverage.html
-complexity:
- @./node_modules/.bin/cr -o complexity.md -f markdown lib
+ @node node_modules/lab/bin/lab -r html -o coverage.html
-.PHONY: test test-cov test-cov-html complexity
+.PHONY: test test-cov test-cov-html
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js
index e492cd9386..e91718b4ff 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js
@@ -29,7 +29,6 @@ exports.time = function (options, callback) {
// Ensure callback is only called once
- var isFinished = false;
var finish = function (err, result) {
if (timeoutId) {
@@ -37,14 +36,14 @@ exports.time = function (options, callback) {
timeoutId = 0;
}
- if (!isFinished) {
- isFinished = true;
- socket.removeAllListeners();
- socket.close();
- return callback(err, result);
- }
+ socket.removeAllListeners();
+ socket.once('error', internals.ignore);
+ socket.close();
+ return callback(err, result);
};
+ finish = Hoek.once(finish);
+
// Create UDP socket
var socket = Dgram.createSocket('udp4');
@@ -99,7 +98,7 @@ exports.time = function (options, callback) {
Dns.reverse(message.referenceId, function (err, domains) {
- if (!err) {
+ if (/* $lab:coverage:off$ */ !err /* $lab:coverage:on$ */) {
message.referenceHost = domains[0];
}
@@ -318,7 +317,7 @@ exports.offset = function (options, callback) {
now < internals.last.expires) {
process.nextTick(function () {
-
+
callback(null, internals.last.offset);
});
@@ -359,10 +358,10 @@ exports.start = function (options, callback) {
if (internals.now.intervalId) {
process.nextTick(function () {
-
+
callback();
});
-
+
return;
}
@@ -407,3 +406,7 @@ exports.now = function () {
return now + internals.last.offset;
};
+
+internals.ignore = 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 0656c84e19..45356c8c7a 100755
--- 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
@@ -1,10 +1,10 @@
{
"name": "sntp",
"description": "SNTP Client",
- "version": "0.2.4",
+ "version": "1.0.9",
"author": {
"name": "Eran Hammer",
- "email": "eran@hueniverse.com",
+ "email": "eran@hammer.io",
"url": "http://hueniverse.com"
},
"contributors": [],
@@ -22,11 +22,10 @@
"node": ">=0.8.0"
},
"dependencies": {
- "hoek": "0.9.x"
+ "hoek": "2.x.x"
},
"devDependencies": {
- "lab": "0.1.x",
- "complexity-report": "0.x.x"
+ "lab": "4.x.x"
},
"scripts": {
"test": "make test-cov"
@@ -37,13 +36,15 @@
"url": "http://github.com/hueniverse/sntp/raw/master/LICENSE"
}
],
- "_id": "sntp@0.2.4",
- "dist": {
- "shasum": "fb885f18b0f3aad189f824862536bceeec750900",
- "tarball": "http://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz"
+ "gitHead": "ee2e35284f684609990681734d39010cd356d7da",
+ "bugs": {
+ "url": "https://github.com/hueniverse/sntp/issues"
},
- "_from": "sntp@>=0.2.0 <0.3.0",
- "_npmVersion": "1.2.18",
+ "homepage": "https://github.com/hueniverse/sntp",
+ "_id": "sntp@1.0.9",
+ "_shasum": "6541184cc90aeea6c6e7b35e2659082443c66198",
+ "_from": "sntp@>=1.0.0 <2.0.0",
+ "_npmVersion": "1.4.23",
"_npmUser": {
"name": "hueniverse",
"email": "eran@hueniverse.com"
@@ -54,12 +55,11 @@
"email": "eran@hueniverse.com"
}
],
- "directories": {},
- "_shasum": "fb885f18b0f3aad189f824862536bceeec750900",
- "_resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz",
- "bugs": {
- "url": "https://github.com/hueniverse/sntp/issues"
+ "dist": {
+ "shasum": "6541184cc90aeea6c6e7b35e2659082443c66198",
+ "tarball": "http://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz"
},
- "readme": "ERROR: No README data found!",
- "homepage": "https://github.com/hueniverse/sntp"
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js
index 38a5534673..f1d1cdabf5 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js
@@ -1,5 +1,6 @@
// Load modules
+var Dns = require('dns');
var Dgram = require('dgram');
var Lab = require('lab');
var Sntp = require('../lib');
@@ -12,11 +13,12 @@ var internals = {};
// Test shortcuts
+var lab = exports.lab = Lab.script();
+var before = lab.before;
+var after = lab.after;
+var describe = lab.experiment;
+var it = lab.test;
var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
describe('SNTP', function () {
@@ -64,14 +66,14 @@ describe('SNTP', function () {
});
});
- it('errors on error event', function (done) {
+ it('errors on error event', { parallel: false }, function (done) {
var orig = Dgram.createSocket;
Dgram.createSocket = function (type) {
Dgram.createSocket = orig;
var socket = Dgram.createSocket(type);
- process.nextTick(function () { socket.emit('error', new Error('Fake')) });
+ setImmediate(function () { socket.emit('error', new Error('Fake')) });
return socket;
};
@@ -84,13 +86,31 @@ describe('SNTP', function () {
});
});
+ it('errors on incorrect sent size', { parallel: false }, function (done) {
+
+ var orig = Dgram.Socket.prototype.send;
+ Dgram.Socket.prototype.send = function (buf, offset, length, port, address, callback) {
+
+ Dgram.Socket.prototype.send = orig;
+ return callback(null, 40);
+ };
+
+ Sntp.time(function (err, time) {
+
+ expect(err).to.exist;
+ expect(time).to.not.exist;
+ expect(err.message).to.equal('Could not send entire message');
+ done();
+ });
+ });
+
it('times out on invalid host', function (done) {
Sntp.time({ host: 'error', timeout: 10000 }, function (err, time) {
expect(err).to.exist;
expect(time).to.not.exist;
- expect(err.message).to.equal('getaddrinfo ENOTFOUND');
+ expect(err.message).to.contain('getaddrinfo');
done();
});
});
@@ -162,6 +182,30 @@ describe('SNTP', function () {
});
});
+ it('fails on bad originateTimestamp', function (done) {
+
+ messup([[24, 0x83], [25, 0xaa], [26, 0x7e], [27, 0x80], [28, 0], [29, 0], [30, 0], [31, 0]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(err.message).to.equal('Invalid server response');
+ done();
+ });
+ });
+
+ it('fails on bad receiveTimestamp', function (done) {
+
+ messup([[32, 0x83], [33, 0xaa], [34, 0x7e], [35, 0x80], [36, 0], [37, 0], [38, 0], [39, 0]]);
+
+ Sntp.time({ host: 'localhost', port: 49123 }, function (err, time) {
+
+ expect(err).to.exist;
+ expect(err.message).to.equal('Invalid server response');
+ done();
+ });
+ });
+
it('fails on bad originate timestamp and alarm li', function (done) {
messup([[0, (3 << 6) + (4 << 3) + (4 << 0)]]);
@@ -288,6 +332,38 @@ describe('SNTP', function () {
});
});
+ it('gets the new offset on different server', function (done) {
+
+ Sntp.offset(function (err, offset) {
+
+ expect(err).to.not.exist;
+ expect(offset).to.not.equal(0);
+ var offset1 = offset;
+ Sntp.offset({ host: 'nist1-sj.ustiming.org' }, function (err, offset) {
+
+ expect(err).to.not.exist;
+ expect(offset).to.not.equal(offset1);
+ done();
+ });
+ });
+ });
+
+ it('gets the new offset on different server', function (done) {
+
+ Sntp.offset(function (err, offset) {
+
+ expect(err).to.not.exist;
+ expect(offset).to.not.equal(0);
+ var offset1 = offset;
+ Sntp.offset({ port: 123 }, function (err, offset) {
+
+ expect(err).to.not.exist;
+ expect(offset).to.not.equal(offset1);
+ done();
+ });
+ });
+ });
+
it('fails getting the current offset on invalid server', function (done) {
Sntp.offset({ host: 'error' }, function (err, offset) {
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 fadd7a97f0..4fe0064cae 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/package.json
+++ b/deps/npm/node_modules/request/node_modules/hawk/package.json
@@ -1,10 +1,10 @@
{
"name": "hawk",
"description": "HTTP Hawk Authentication Scheme",
- "version": "1.1.1",
+ "version": "2.3.1",
"author": {
"name": "Eran Hammer",
- "email": "eran@hueniverse.com",
+ "email": "eran@hammer.io",
"url": "http://hueniverse.com"
},
"contributors": [],
@@ -22,16 +22,16 @@
"engines": {
"node": ">=0.8.0"
},
+ "browser": "./lib/browser.js",
"dependencies": {
- "hoek": "0.9.x",
- "boom": "0.4.x",
- "cryptiles": "0.2.x",
- "sntp": "0.2.x"
+ "hoek": "2.x.x",
+ "boom": "2.x.x",
+ "cryptiles": "2.x.x",
+ "sntp": "1.x.x"
},
"devDependencies": {
- "lab": "0.1.x",
- "complexity-report": "0.x.x",
- "localStorage": "1.0.x"
+ "code": "1.x.x",
+ "lab": "5.x.x"
},
"scripts": {
"test": "make test-cov"
@@ -42,16 +42,15 @@
"url": "http://github.com/hueniverse/hawk/raw/master/LICENSE"
}
],
+ "gitHead": "492632da51ecedd5f59ce96f081860ad24ce6532",
"bugs": {
"url": "https://github.com/hueniverse/hawk/issues"
},
- "_id": "hawk@1.1.1",
- "dist": {
- "shasum": "87cd491f9b46e4e2aeaca335416766885d2d1ed9",
- "tarball": "http://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz"
- },
- "_from": "hawk@1.1.1",
- "_npmVersion": "1.3.8",
+ "homepage": "https://github.com/hueniverse/hawk",
+ "_id": "hawk@2.3.1",
+ "_shasum": "1e731ce39447fa1d0f6d707f7bceebec0fd1ec1f",
+ "_from": "hawk@>=2.3.0 <2.4.0",
+ "_npmVersion": "1.4.28",
"_npmUser": {
"name": "hueniverse",
"email": "eran@hueniverse.com"
@@ -62,9 +61,11 @@
"email": "eran@hueniverse.com"
}
],
+ "dist": {
+ "shasum": "1e731ce39447fa1d0f6d707f7bceebec0fd1ec1f",
+ "tarball": "http://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz"
+ },
"directories": {},
- "_shasum": "87cd491f9b46e4e2aeaca335416766885d2d1ed9",
- "_resolved": "https://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz",
- "readme": "ERROR: No README data found!",
- "homepage": "https://github.com/hueniverse/hawk"
+ "_resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz",
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/browser.js b/deps/npm/node_modules/request/node_modules/hawk/test/browser.js
index 5bcb910c12..a45241389c 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/test/browser.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/test/browser.js
@@ -1,10 +1,11 @@
// Load modules
-var Lab = require('lab');
-var Hoek = require('hoek');
+var Url = require('url');
+var Code = require('code');
var Hawk = require('../lib');
+var Hoek = require('hoek');
+var Lab = require('lab');
var Browser = require('../lib/browser');
-var LocalStorage = require('localStorage');
// Declare internals
@@ -14,11 +15,10 @@ var internals = {};
// Test shortcuts
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
describe('Browser', function () {
@@ -35,7 +35,205 @@ describe('Browser', function () {
return callback(null, credentials);
};
- it('should generate a header then successfully parse it (configuration)', function (done) {
+ it('should generate a bewit then successfully authenticate it', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?a=1&b=2',
+ host: 'example.com',
+ port: 80
+ };
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var bewit = Browser.client.bewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials, ttlSec: 60 * 60 * 24 * 365 * 100, ext: 'some-app-data' });
+ req.url += '&bewit=' + bewit;
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ expect(attributes.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+
+ it('should generate a bewit then successfully authenticate it (no ext)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?a=1&b=2',
+ host: 'example.com',
+ port: 80
+ };
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var bewit = Browser.client.bewit('http://example.com/resource/4?a=1&b=2', { credentials: credentials, ttlSec: 60 * 60 * 24 * 365 * 100 });
+ req.url += '&bewit=' + bewit;
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ done();
+ });
+ });
+ });
+
+ describe('#bewit', function () {
+
+ it('returns a valid bewit value', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6');
+ done();
+ });
+
+ it('returns a valid bewit value (explicit HTTP port)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('http://example.com:8080/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcaFpiSjNQMmNLRW80a3kwQzhqa1pBa1J5Q1p1ZWc0V1NOYnhWN3ZxM3hIVT1ceGFuZHlhbmR6');
+ done();
+ });
+
+ it('returns a valid bewit value (explicit HTTPS port)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com:8043/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcL2t4UjhwK0xSaTdvQTRnUXc3cWlxa3BiVHRKYkR4OEtRMC9HRUwvVytTUT1ceGFuZHlhbmR6');
+ done();
+ });
+
+ it('returns a valid bewit value (null ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: null });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcSUdZbUxnSXFMckNlOEN4dktQczRKbFdJQStValdKSm91d2dBUmlWaENBZz1c');
+ done();
+ });
+
+ it('errors on invalid options', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', 4);
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on missing uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit(5, { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
+
+ var credentials = {
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on missing credentials', function (done) {
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { ttlSec: 3000, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid algorithm', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'hmac-sha-0'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on missing options', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'hmac-sha-0'
+ };
+
+ var bewit = Browser.client.bewit('https://example.com/somewhere/over/the/rainbow');
+ expect(bewit).to.equal('');
+ done();
+ });
+ });
+
+ it('generates a header then successfully parse it (configuration)', function (done) {
var req = {
method: 'GET',
@@ -47,11 +245,11 @@ describe('Browser', function () {
credentialsFunc('123456', function (err, credentials) {
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field;
- expect(req.authorization).to.exist;
+ expect(req.authorization).to.exist();
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
done();
@@ -59,7 +257,7 @@ describe('Browser', function () {
});
});
- it('should generate a header then successfully parse it (node request)', function (done) {
+ it('generates a header then successfully parse it (node request)', function (done) {
var req = {
method: 'POST',
@@ -79,7 +277,7 @@ describe('Browser', function () {
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true);
@@ -95,7 +293,7 @@ describe('Browser', function () {
};
res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(res.headers['server-authorization']).to.exist;
+ expect(res.headers['server-authorization']).to.exist();
expect(Browser.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(true);
done();
@@ -103,7 +301,7 @@ describe('Browser', function () {
});
});
- it('should generate a header then successfully parse it (no server header options)', function (done) {
+ it('generates a header then successfully parse it (browserify)', function (done) {
var req = {
method: 'POST',
@@ -123,7 +321,75 @@ describe('Browser', function () {
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true);
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain'
+ },
+ getHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(res.headers['server-authorization']).to.exist();
+
+ expect(Browser.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(true);
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (time offset)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', localtimeOffsetMsec: 100000 }).field;
+ expect(req.authorization).to.exist();
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (no server header options)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: '/resource/4?filter=a',
+ headers: {
+ host: 'example.com:8080',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ var payload = 'some not so random text';
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var reqHeader = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
+ req.headers.authorization = reqHeader.field;
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
+
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true);
@@ -139,7 +405,7 @@ describe('Browser', function () {
};
res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts);
- expect(res.headers['server-authorization']).to.exist;
+ expect(res.headers['server-authorization']).to.exist();
expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true);
done();
@@ -147,7 +413,7 @@ describe('Browser', function () {
});
});
- it('should generate a header then successfully parse it (no server header)', function (done) {
+ it('generates a header then successfully parse it (no server header)', function (done) {
var req = {
method: 'POST',
@@ -167,7 +433,7 @@ describe('Browser', function () {
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true);
@@ -188,7 +454,7 @@ describe('Browser', function () {
});
});
- it('should generate a header with stale ts and successfully authenticate on second call', function (done) {
+ it('generates a header with stale ts and successfully authenticate on second call', function (done) {
var req = {
method: 'GET',
@@ -202,16 +468,16 @@ describe('Browser', function () {
Browser.utils.setNtpOffset(60 * 60 * 1000);
var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' });
req.authorization = header.field;
- expect(req.authorization).to.exist;
+ expect(req.authorization).to.exist();
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Stale timestamp');
var res = {
headers: {
- 'www-authenticate': err.response.headers['WWW-Authenticate']
+ 'www-authenticate': err.output.headers['WWW-Authenticate']
},
getResponseHeader: function (header) {
@@ -224,11 +490,11 @@ describe('Browser', function () {
expect(Browser.utils.getNtpOffset()).to.equal(0);
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field;
- expect(req.authorization).to.exist;
+ expect(req.authorization).to.exist();
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
done();
@@ -237,7 +503,7 @@ describe('Browser', function () {
});
});
- it('should generate a header with stale ts and successfully authenticate on second call (manual localStorage)', function (done) {
+ it('generates a header with stale ts and successfully authenticate on second call (manual localStorage)', function (done) {
var req = {
method: 'GET',
@@ -247,21 +513,24 @@ describe('Browser', function () {
};
credentialsFunc('123456', function (err, credentials) {
- Browser.utils.setStorage(LocalStorage)
+
+ var localStorage = new Browser.internals.LocalStorage();
+
+ Browser.utils.setStorage(localStorage)
Browser.utils.setNtpOffset(60 * 60 * 1000);
var header = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' });
req.authorization = header.field;
- expect(req.authorization).to.exist;
+ expect(req.authorization).to.exist();
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Stale timestamp');
var res = {
headers: {
- 'www-authenticate': err.response.headers['WWW-Authenticate']
+ 'www-authenticate': err.output.headers['WWW-Authenticate']
},
getResponseHeader: function (header) {
@@ -269,18 +538,18 @@ describe('Browser', function () {
}
};
- expect(parseInt(LocalStorage.getItem('hawk_ntp_offset'))).to.equal(60 * 60 * 1000);
+ expect(parseInt(localStorage.getItem('hawk_ntp_offset'))).to.equal(60 * 60 * 1000);
expect(Browser.utils.getNtpOffset()).to.equal(60 * 60 * 1000);
expect(Browser.client.authenticate(res, credentials, header.artifacts)).to.equal(true);
expect(Browser.utils.getNtpOffset()).to.equal(0);
- expect(parseInt(LocalStorage.getItem('hawk_ntp_offset'))).to.equal(0);
+ expect(parseInt(localStorage.getItem('hawk_ntp_offset'))).to.equal(0);
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data' }).field;
- expect(req.authorization).to.exist;
+ expect(req.authorization).to.exist();
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
done();
@@ -289,7 +558,7 @@ describe('Browser', function () {
});
});
- it('should generate a header then fails to parse it (missing server header hash)', function (done) {
+ it('generates a header then fails to parse it (missing server header hash)', function (done) {
var req = {
method: 'POST',
@@ -309,7 +578,7 @@ describe('Browser', function () {
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true);
@@ -325,7 +594,7 @@ describe('Browser', function () {
};
res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts);
- expect(res.headers['server-authorization']).to.exist;
+ expect(res.headers['server-authorization']).to.exist();
expect(Browser.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(false);
done();
@@ -333,7 +602,7 @@ describe('Browser', function () {
});
});
- it('should generate a header then successfully parse it (with hash)', function (done) {
+ it('generates a header then successfully parse it (with hash)', function (done) {
var req = {
method: 'GET',
@@ -347,7 +616,7 @@ describe('Browser', function () {
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
done();
@@ -355,7 +624,7 @@ describe('Browser', function () {
});
});
- it('should generate a header then successfully parse it then validate payload', function (done) {
+ it('generates a header then successfully parse it then validate payload', function (done) {
var req = {
method: 'GET',
@@ -369,17 +638,17 @@ describe('Browser', function () {
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload('hola!', credentials, artifacts)).to.be.true;
- expect(Hawk.server.authenticatePayload('hello!', credentials, artifacts)).to.be.false;
+ expect(Hawk.server.authenticatePayload('hola!', credentials, artifacts)).to.be.true();
+ expect(Hawk.server.authenticatePayload('hello!', credentials, artifacts)).to.be.false();
done();
});
});
});
- it('should generate a header then successfully parse it (app)', function (done) {
+ it('generates a header then successfully parse it (app)', function (done) {
var req = {
method: 'GET',
@@ -393,7 +662,7 @@ describe('Browser', function () {
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(artifacts.app).to.equal('asd23ased');
@@ -402,7 +671,7 @@ describe('Browser', function () {
});
});
- it('should generate a header then successfully parse it (app, dlg)', function (done) {
+ it('generates a header then successfully parse it (app, dlg)', function (done) {
var req = {
method: 'GET',
@@ -416,7 +685,7 @@ describe('Browser', function () {
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(artifacts.app).to.equal('asd23ased');
@@ -426,7 +695,7 @@ describe('Browser', function () {
});
});
- it('should generate a header then fail authentication due to bad hash', function (done) {
+ it('generates a header then fail authentication due to bad hash', function (done) {
var req = {
method: 'GET',
@@ -440,14 +709,14 @@ describe('Browser', function () {
req.authorization = Browser.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field;
Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Bad payload hash');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad payload hash');
done();
});
});
});
- it('should generate a header for one resource then fail to authenticate another', function (done) {
+ it('generates a header for one resource then fail to authenticate another', function (done) {
var req = {
method: 'GET',
@@ -463,8 +732,8 @@ describe('Browser', function () {
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(credentials).to.exist;
+ expect(err).to.exist();
+ expect(credentials).to.exist();
done();
});
});
@@ -474,7 +743,7 @@ describe('Browser', function () {
describe('#header', function () {
- it('should return a valid authorization header (sha1)', function (done) {
+ it('returns a valid authorization header (sha1)', function (done) {
var credentials = {
id: '123456',
@@ -487,7 +756,7 @@ describe('Browser', function () {
done();
});
- it('should return a valid authorization header (sha256)', function (done) {
+ it('returns a valid authorization header (sha256)', function (done) {
var credentials = {
id: '123456',
@@ -500,7 +769,20 @@ describe('Browser', function () {
done();
});
- it('should return a valid authorization header (no ext)', function (done) {
+ it('returns a valid authorization header (empty payload)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var header = Browser.client.header('http://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: '' }).field;
+ expect(header).to.equal('Hawk id=\"123456\", ts=\"1353809207\", nonce=\"Ygvqdz\", hash=\"404ghL7K+hfyhByKKejFBRGgTjU=\", ext=\"Bazinga!\", mac=\"Bh1sj1DOfFRWOdi3ww52nLCJdBE=\"');
+ done();
+ });
+
+ it('returns a valid authorization header (no ext)', function (done) {
var credentials = {
id: '123456',
@@ -513,26 +795,132 @@ describe('Browser', function () {
done();
});
- it('should return an empty authorization header on missing options', function (done) {
+ it('returns a valid authorization header (null ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain', ext: null }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
+ done();
+ });
+
+ it('returns a valid authorization header (uri object)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var uri = Browser.utils.parseUri('https://example.net/somewhere/over/the/rainbow');
+ var header = Browser.client.header(uri, 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
+ done();
+ });
+
+ it('errors on missing options', function (done) {
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST');
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on empty uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on invalid uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header(4, 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on missing method', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', '', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on invalid method', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 5, { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on missing credentials', function (done) {
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST').field;
- expect(header).to.equal('');
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credentials object');
done();
});
- it('should return an empty authorization header on invalid credentials', function (done) {
+ it('errors on invalid credentials (id)', function (done) {
var credentials = {
key: '2983d45yun89q',
algorithm: 'sha256'
};
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 }).field;
- expect(header).to.equal('');
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credentials object');
+ done();
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ algorithm: 'sha256'
+ };
+
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credentials object');
done();
});
- it('should return an empty authorization header on invalid algorithm', function (done) {
+ it('errors on invalid algorithm', function (done) {
var credentials = {
id: '123456',
@@ -540,15 +928,64 @@ describe('Browser', function () {
algorithm: 'hmac-sha-0'
};
- var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 }).field;
- expect(header).to.equal('');
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Unknown algorithm');
+ done();
+ });
+
+ it('uses a pre-calculated payload hash', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var options = { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' };
+ options.hash = Browser.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
+ var header = Browser.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', options).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", ext="Bazinga!", mac="q1CwFoSHzPZSkbIvl0oYlD+91rBUEvFk763nMjMndj8="');
done();
});
});
describe('#authenticate', function () {
- it('should return false on invalid header', function (done) {
+ it('skips tsm validation when missing ts', function (done) {
+
+ var res = {
+ headers: {
+ 'www-authenticate': 'Hawk error="Stale timestamp"'
+ },
+ getResponseHeader: function (header) {
+
+ return res.headers[header.toLowerCase()];
+ }
+ };
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ ts: 1402135580,
+ nonce: 'iBRB6t',
+ method: 'GET',
+ resource: '/resource/4?filter=a',
+ host: 'example.com',
+ port: '8080',
+ ext: 'some-app-data'
+ };
+
+ expect(Browser.client.authenticate(res, credentials, artifacts)).to.equal(true);
+ done();
+ });
+
+ it('returns false on invalid header', function (done) {
var res = {
headers: {
@@ -564,7 +1001,7 @@ describe('Browser', function () {
done();
});
- it('should return false on invalid mac', function (done) {
+ it('returns false on invalid mac', function (done) {
var res = {
headers: {
@@ -603,7 +1040,7 @@ describe('Browser', function () {
done();
});
- it('should return true on ignoring hash', function (done) {
+ it('returns true on ignoring hash', function (done) {
var res = {
headers: {
@@ -642,7 +1079,7 @@ describe('Browser', function () {
done();
});
- it('should fail on invalid WWW-Authenticate header format', function (done) {
+ it('errors on invalid WWW-Authenticate header format', function (done) {
var res = {
headers: {
@@ -658,7 +1095,7 @@ describe('Browser', function () {
done();
});
- it('should fail on invalid WWW-Authenticate header format', function (done) {
+ it('errors on invalid WWW-Authenticate header format', function (done) {
var credentials = {
id: '123456',
@@ -683,47 +1120,151 @@ describe('Browser', function () {
});
describe('#message', function () {
- it('should generate an authorization then successfully parse it', function (done) {
+
+ it('generates an authorization then successfully parse it', function (done) {
credentialsFunc('123456', function (err, credentials) {
var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: credentials });
- expect(auth).to.exist;
+ expect(auth).to.exist();
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
done();
});
});
});
- it('should fail on missing host', function (done) {
+ it('generates an authorization using custom nonce/timestamp', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: credentials, nonce: 'abc123', timestamp: 1398536270957 });
+ expect(auth).to.exist();
+ expect(auth.nonce).to.equal('abc123');
+ expect(auth.ts).to.equal(1398536270957);
+ done();
+ });
+ });
+
+ it('errors on missing host', function (done) {
credentialsFunc('123456', function (err, credentials) {
var auth = Browser.client.message(null, 8080, 'some message', { credentials: credentials });
- expect(auth).to.not.exist;
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on invalid host', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message(5, 8080, 'some message', { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on missing port', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 0, 'some message', { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on invalid port', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 'a', 'some message', { credentials: credentials });
+ expect(auth).to.not.exist();
done();
});
});
- it('should fail on missing credentials', function (done) {
+ it('errors on missing message', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 8080, undefined, { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on null message', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 8080, null, { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on invalid message', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Browser.client.message('example.com', 8080, 5, { credentials: credentials });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on missing credentials', function (done) {
var auth = Browser.client.message('example.com', 8080, 'some message', {});
- expect(auth).to.not.exist;
+ expect(auth).to.not.exist();
done();
});
- it('should fail on invalid algorithm', function (done) {
+ it('errors on missing options', function (done) {
+
+ var auth = Browser.client.message('example.com', 8080, 'some message');
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var creds = Hoek.clone(credentials);
+ delete creds.id;
+ var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var creds = Hoek.clone(credentials);
+ delete creds.key;
+ var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
+ expect(auth).to.not.exist();
+ done();
+ });
+ });
+
+ it('errors on invalid algorithm', function (done) {
credentialsFunc('123456', function (err, credentials) {
var creds = Hoek.clone(credentials);
creds.algorithm = 'blah';
var auth = Browser.client.message('example.com', 8080, 'some message', { credentials: creds });
- expect(auth).to.not.exist;
+ expect(auth).to.not.exist();
done();
});
});
@@ -731,7 +1272,7 @@ describe('Browser', function () {
describe('#authenticateTimestamp', function (done) {
- it('should validate a timestamp', function (done) {
+ it('validates a timestamp', function (done) {
credentialsFunc('123456', function (err, credentials) {
@@ -741,7 +1282,19 @@ describe('Browser', function () {
});
});
- it('should detect a bad timestamp', function (done) {
+ it('validates a timestamp without updating local time', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var offset = Browser.utils.getNtpOffset();
+ var tsm = Hawk.crypto.timestampMessage(credentials, 10000);
+ expect(Browser.client.authenticateTimestamp(tsm, credentials, false)).to.equal(true);
+ expect(offset).to.equal(Browser.utils.getNtpOffset());
+ done();
+ });
+ });
+
+ it('detects a bad timestamp', function (done) {
credentialsFunc('123456', function (err, credentials) {
@@ -754,64 +1307,147 @@ describe('Browser', function () {
});
});
- describe('#parseAuthorizationHeader', function (done) {
+ describe('internals', function () {
+
+ describe('LocalStorage', function () {
+
+ it('goes through the full lifecycle', function (done) {
+
+ var storage = new Browser.internals.LocalStorage();
+ expect(storage.length).to.equal(0);
+ expect(storage.getItem('a')).to.equal(null);
+ storage.setItem('a', 5);
+ expect(storage.length).to.equal(1);
+ expect(storage.key()).to.equal('a');
+ expect(storage.key(0)).to.equal('a');
+ expect(storage.getItem('a')).to.equal('5');
+ storage.setItem('b', 'test');
+ expect(storage.key()).to.equal('a');
+ expect(storage.key(0)).to.equal('a');
+ expect(storage.key(1)).to.equal('b');
+ expect(storage.length).to.equal(2);
+ expect(storage.getItem('b')).to.equal('test');
+ storage.removeItem('a');
+ expect(storage.length).to.equal(1);
+ expect(storage.getItem('a')).to.equal(null);
+ expect(storage.getItem('b')).to.equal('test');
+ storage.clear();
+ expect(storage.length).to.equal(0);
+ expect(storage.getItem('a')).to.equal(null);
+ expect(storage.getItem('b')).to.equal(null);
+ done();
+ });
+ });
+ });
- it('returns null on missing header', function (done) {
+ describe('utils', function () {
- expect(Browser.utils.parseAuthorizationHeader()).to.equal(null);
- done();
- });
+ describe('#setStorage', function () {
- it('returns null on bad header syntax (structure)', function (done) {
+ it('sets storage for the first time', function (done) {
- expect(Browser.utils.parseAuthorizationHeader('Hawk')).to.equal(null);
- done();
+ Browser.utils.storage = new Browser.internals.LocalStorage(); // Reset state
+
+ expect(Browser.utils.storage.getItem('hawk_ntp_offset')).to.not.exist();
+ Browser.utils.storage.setItem('test', '1');
+ Browser.utils.setStorage(new Browser.internals.LocalStorage());
+ expect(Browser.utils.storage.getItem('test')).to.not.exist();
+ Browser.utils.storage.setItem('test', '2');
+ expect(Browser.utils.storage.getItem('test')).to.equal('2');
+ done();
+ });
});
- it('returns null on bad header syntax (parts)', function (done) {
+ describe('#setNtpOffset', function (done) {
- expect(Browser.utils.parseAuthorizationHeader(' ')).to.equal(null);
- done();
- });
+ it('catches localStorage errors', function (done) {
- it('returns null on bad scheme name', function (done) {
+ var orig = Browser.utils.storage.setItem;
+ var error = console.error;
+ var count = 0;
+ console.error = function () { if (count++ === 2) { console.error = error; } };
+ Browser.utils.storage.setItem = function () {
- expect(Browser.utils.parseAuthorizationHeader('Basic asdasd')).to.equal(null);
- done();
- });
+ Browser.utils.storage.setItem = orig;
+ throw new Error()
+ };
- it('returns null on bad attribute value', function (done) {
+ expect(function () {
+ Browser.utils.setNtpOffset(100);
+ }).not.to.throw();
- expect(Browser.utils.parseAuthorizationHeader('Hawk test="\t"', ['test'])).to.equal(null);
- done();
+ done();
+ });
});
- it('returns null on duplicated attribute', function (done) {
+ describe('#parseAuthorizationHeader', function (done) {
- expect(Browser.utils.parseAuthorizationHeader('Hawk test="a", test="b"', ['test'])).to.equal(null);
- done();
+ it('returns null on missing header', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader()).to.equal(null);
+ done();
+ });
+
+ it('returns null on bad header syntax (structure)', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader('Hawk')).to.equal(null);
+ done();
+ });
+
+ it('returns null on bad header syntax (parts)', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader(' ')).to.equal(null);
+ done();
+ });
+
+ it('returns null on bad scheme name', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader('Basic asdasd')).to.equal(null);
+ done();
+ });
+
+ it('returns null on bad attribute value', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader('Hawk test="\t"', ['test'])).to.equal(null);
+ done();
+ });
+
+ it('returns null on duplicated attribute', function (done) {
+
+ expect(Browser.utils.parseAuthorizationHeader('Hawk test="a", test="b"', ['test'])).to.equal(null);
+ done();
+ });
});
- });
- describe('#setNtpOffset', function (done) {
+ describe('#parseUri', function () {
+
+ it('returns empty port when unknown scheme', function (done) {
- it('catches localStorage errors', function (done) {
+ var uri = Browser.utils.parseUri('ftp://domain');
+ expect(uri.port).to.equal('');
+ done();
+ });
- var orig = Browser.utils.storage.setItem;
- var error = console.error;
- var count = 0;
- console.error = function () { if (count++ === 2) { console.error.error; } };
- Browser.utils.storage.setItem = function () {
+ it('returns default port when missing', function (done) {
- Browser.utils.storage.setItem = orig;
- throw new Error()
- };
+ var uri = Browser.utils.parseUri('http://');
+ expect(uri.port).to.equal('80');
+ done();
+ });
+ });
- expect(function () {
- Browser.utils.setNtpOffset(100);
- }).not.to.throw();
+ var str = "https://www.google.ca/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=url";
+ var base64str = "aHR0cHM6Ly93d3cuZ29vZ2xlLmNhL3dlYmhwP3NvdXJjZWlkPWNocm9tZS1pbnN0YW50Jmlvbj0xJmVzcHY9MiZpZT1VVEYtOCNxPXVybA";
+
+ describe('#base64urlEncode', function () {
+
+ it('should base64 URL-safe decode a string', function (done) {
+
+ expect(Browser.utils.base64urlEncode(str)).to.equal(base64str);
+ done();
+ });
- done();
});
+
});
});
diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/client.js b/deps/npm/node_modules/request/node_modules/hawk/test/client.js
index bcc4222a0f..5983897b21 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/test/client.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/test/client.js
@@ -1,8 +1,9 @@
// Load modules
var Url = require('url');
-var Lab = require('lab');
+var Code = require('code');
var Hawk = require('../lib');
+var Lab = require('lab');
// Declare internals
@@ -12,11 +13,10 @@ var internals = {};
// Test shortcuts
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
describe('Hawk', function () {
@@ -25,7 +25,7 @@ describe('Hawk', function () {
describe('#header', function () {
- it('should return a valid authorization header (sha1)', function (done) {
+ it('returns a valid authorization header (sha1)', function (done) {
var credentials = {
id: '123456',
@@ -38,7 +38,7 @@ describe('Hawk', function () {
done();
});
- it('should return a valid authorization header (sha256)', function (done) {
+ it('returns a valid authorization header (sha256)', function (done) {
var credentials = {
id: '123456',
@@ -51,7 +51,7 @@ describe('Hawk', function () {
done();
});
- it('should return a valid authorization header (no ext)', function (done) {
+ it('returns a valid authorization header (no ext)', function (done) {
var credentials = {
id: '123456',
@@ -64,26 +64,122 @@ describe('Hawk', function () {
done();
});
- it('should return an empty authorization header on missing options', function (done) {
+ it('returns a valid authorization header (null ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain', ext: null }).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
+ done();
+ });
+
+ it('returns a valid authorization header (empty payload)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: '', contentType: 'text/plain' }).field;
+ expect(header).to.equal('Hawk id=\"123456\", ts=\"1353809207\", nonce=\"Ygvqdz\", hash=\"q/t+NNAkQZNlq/aAD6PlexImwQTxwgT2MahfTa9XRLA=\", mac=\"U5k16YEzn3UnBHKeBzsDXn067Gu3R4YaY6xOt9PYRZM=\"');
+ done();
+ });
+
+ it('returns a valid authorization header (pre hashed payload)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var options = { credentials: credentials, timestamp: 1353809207, nonce: 'Ygvqdz', payload: 'something to write about', contentType: 'text/plain' };
+ options.hash = Hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', options).field;
+ expect(header).to.equal('Hawk id="123456", ts="1353809207", nonce="Ygvqdz", hash="2QfCt3GuY9HQnHWyWD3wX68ZOKbynqlfYmuO2ZBRqtY=", mac="HTgtd0jPI6E4izx8e4OHdO36q00xFCU0FolNq3RiCYs="');
+ done();
+ });
+
+ it('errors on missing uri', function (done) {
+
+ var header = Hawk.client.header('', 'POST');
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on invalid uri', function (done) {
+
+ var header = Hawk.client.header(4, 'POST');
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on missing method', function (done) {
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST').field;
- expect(header).to.equal('');
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', '');
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
done();
});
- it('should return an empty authorization header on invalid credentials', function (done) {
+ it('errors on invalid method', function (done) {
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 5);
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on missing options', function (done) {
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST');
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid argument type');
+ done();
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
var credentials = {
key: '2983d45yun89q',
algorithm: 'sha256'
};
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 }).field;
- expect(header).to.equal('');
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credential object');
+ done();
+ });
+
+ it('errors on missing credentials', function (done) {
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credential object');
+ done();
+ });
+
+ it('errors on invalid credentials', function (done) {
+
+ var credentials = {
+ id: '123456',
+ algorithm: 'sha256'
+ };
+
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Invalid credential object');
done();
});
- it('should return an empty authorization header on invalid algorithm', function (done) {
+ it('errors on invalid algorithm', function (done) {
var credentials = {
id: '123456',
@@ -91,15 +187,16 @@ describe('Hawk', function () {
algorithm: 'hmac-sha-0'
};
- var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 }).field;
- expect(header).to.equal('');
+ var header = Hawk.client.header('https://example.net/somewhere/over/the/rainbow', 'POST', { credentials: credentials, payload: 'something, anything!', ext: 'Bazinga!', timestamp: 1353809207 });
+ expect(header.field).to.equal('');
+ expect(header.err).to.equal('Unknown algorithm');
done();
});
});
describe('#authenticate', function () {
- it('should return false on invalid header', function (done) {
+ it('returns false on invalid header', function (done) {
var res = {
headers: {
@@ -111,7 +208,7 @@ describe('Hawk', function () {
done();
});
- it('should return false on invalid mac', function (done) {
+ it('returns false on invalid mac', function (done) {
var res = {
headers: {
@@ -146,7 +243,7 @@ describe('Hawk', function () {
done();
});
- it('should return true on ignoring hash', function (done) {
+ it('returns true on ignoring hash', function (done) {
var res = {
headers: {
@@ -181,14 +278,14 @@ describe('Hawk', function () {
done();
});
- it('should fail on invalid WWW-Authenticate header format', function (done) {
+ it('fails on invalid WWW-Authenticate header format', function (done) {
var header = 'Hawk ts="1362346425875", tsm="PhwayS28vtnn3qbv0mqRBYSXebN/zggEtucfeZ620Zo=", x="Stale timestamp"';
expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, {})).to.equal(false);
done();
});
- it('should fail on invalid WWW-Authenticate header format', function (done) {
+ it('fails on invalid WWW-Authenticate header format', function (done) {
var credentials = {
id: '123456',
@@ -201,6 +298,146 @@ describe('Hawk', function () {
expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, credentials)).to.equal(false);
done();
});
+
+ it('skips tsm validation when missing ts', function (done) {
+
+ var header = 'Hawk error="Stale timestamp"';
+ expect(Hawk.client.authenticate({ headers: { 'www-authenticate': header } }, {})).to.equal(true);
+ done();
+ });
+ });
+
+ describe('#message', function () {
+
+ it('generates authorization', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.exist();
+ expect(auth.ts).to.equal(1353809207);
+ expect(auth.nonce).to.equal('abc123');
+ done();
+ });
+
+ it('errors on invalid host', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message(5, 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on invalid port', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', '80', 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on missing host', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 0, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on null message', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, null, { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on missing message', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, undefined, { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on invalid message', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, 5, { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on missing options', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, 'I am the boodyman');
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
+
+ var credentials = {
+ key: '2983d45yun89q',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ algorithm: 'sha1'
+ };
+
+ var auth = Hawk.client.message('example.com', 80, 'I am the boodyman', { credentials: credentials, timestamp: 1353809207, nonce: 'abc123' });
+ expect(auth).to.not.exist();
+ done();
+ });
});
});
});
diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/crypto.js b/deps/npm/node_modules/request/node_modules/hawk/test/crypto.js
index b62c2177e3..f2d3d45801 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/test/crypto.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/test/crypto.js
@@ -1,7 +1,8 @@
// Load modules
-var Lab = require('lab');
+var Code = require('code');
var Hawk = require('../lib');
+var Lab = require('lab');
// Declare internals
@@ -11,11 +12,10 @@ var internals = {};
// Test shortcuts
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
describe('Hawk', function () {
diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/index.js b/deps/npm/node_modules/request/node_modules/hawk/test/index.js
index ba837388a5..39f2c5b860 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/test/index.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/test/index.js
@@ -1,8 +1,9 @@
// Load modules
var Url = require('url');
-var Lab = require('lab');
+var Code = require('code');
var Hawk = require('../lib');
+var Lab = require('lab');
// Declare internals
@@ -12,11 +13,10 @@ var internals = {};
// Test shortcuts
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
describe('Hawk', function () {
@@ -33,7 +33,7 @@ describe('Hawk', function () {
return callback(null, credentials);
};
- it('should generate a header then successfully parse it (configuration)', function (done) {
+ it('generates a header then successfully parse it (configuration)', function (done) {
var req = {
method: 'GET',
@@ -45,11 +45,11 @@ describe('Hawk', function () {
credentialsFunc('123456', function (err, credentials) {
req.authorization = Hawk.client.header(Url.parse('http://example.com:8080/resource/4?filter=a'), req.method, { credentials: credentials, ext: 'some-app-data' }).field;
- expect(req.authorization).to.exist;
+ expect(req.authorization).to.exist();
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
done();
@@ -57,7 +57,7 @@ describe('Hawk', function () {
});
});
- it('should generate a header then successfully parse it (node request)', function (done) {
+ it('generates a header then successfully parse it (node request)', function (done) {
var req = {
method: 'POST',
@@ -77,7 +77,7 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true);
@@ -89,7 +89,7 @@ describe('Hawk', function () {
};
res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
- expect(res.headers['server-authorization']).to.exist;
+ expect(res.headers['server-authorization']).to.exist();
expect(Hawk.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(true);
done();
@@ -97,7 +97,47 @@ describe('Hawk', function () {
});
});
- it('should generate a header then successfully parse it (no server header options)', function (done) {
+ it('generates a header then successfully parse it (absolute request uri)', function (done) {
+
+ var req = {
+ method: 'POST',
+ url: 'http://example.com:8080/resource/4?filter=a',
+ headers: {
+ host: 'example.com:8080',
+ 'content-type': 'text/plain;x=y'
+ }
+ };
+
+ var payload = 'some not so random text';
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
+ req.headers.authorization = reqHeader.field;
+
+ Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
+
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true);
+
+ var res = {
+ headers: {
+ 'content-type': 'text/plain'
+ }
+ };
+
+ res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(res.headers['server-authorization']).to.exist();
+
+ expect(Hawk.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(true);
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parse it (no server header options)', function (done) {
var req = {
method: 'POST',
@@ -117,7 +157,7 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true);
@@ -129,7 +169,7 @@ describe('Hawk', function () {
};
res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts);
- expect(res.headers['server-authorization']).to.exist;
+ expect(res.headers['server-authorization']).to.exist();
expect(Hawk.client.authenticate(res, credentials, artifacts)).to.equal(true);
done();
@@ -137,7 +177,7 @@ describe('Hawk', function () {
});
});
- it('should generate a header then fails to parse it (missing server header hash)', function (done) {
+ it('generates a header then fails to parse it (missing server header hash)', function (done) {
var req = {
method: 'POST',
@@ -157,7 +197,7 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload(payload, credentials, artifacts, req.headers['content-type'])).to.equal(true);
@@ -169,7 +209,7 @@ describe('Hawk', function () {
};
res.headers['server-authorization'] = Hawk.server.header(credentials, artifacts);
- expect(res.headers['server-authorization']).to.exist;
+ expect(res.headers['server-authorization']).to.exist();
expect(Hawk.client.authenticate(res, credentials, artifacts, { payload: 'some reply' })).to.equal(false);
done();
@@ -177,7 +217,7 @@ describe('Hawk', function () {
});
});
- it('should generate a header then successfully parse it (with hash)', function (done) {
+ it('generates a header then successfully parse it (with hash)', function (done) {
var req = {
method: 'GET',
@@ -191,7 +231,7 @@ describe('Hawk', function () {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
done();
@@ -199,7 +239,7 @@ describe('Hawk', function () {
});
});
- it('should generate a header then successfully parse it then validate payload', function (done) {
+ it('generates a header then successfully parse it then validate payload', function (done) {
var req = {
method: 'GET',
@@ -213,17 +253,39 @@ describe('Hawk', function () {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
+ expect(credentials.user).to.equal('steve');
+ expect(artifacts.ext).to.equal('some-app-data');
+ expect(Hawk.server.authenticatePayload('hola!', credentials, artifacts)).to.be.true();
+ expect(Hawk.server.authenticatePayload('hello!', credentials, artifacts)).to.be.false();
+ done();
+ });
+ });
+ });
+
+ it('generates a header then successfully parses and validates payload', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080
+ };
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field;
+ Hawk.server.authenticate(req, credentialsFunc, { payload: 'hola!' }, function (err, credentials, artifacts) {
+
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
- expect(Hawk.server.authenticatePayload('hola!', credentials, artifacts)).to.be.true;
- expect(Hawk.server.authenticatePayload('hello!', credentials, artifacts)).to.be.false;
done();
});
});
});
- it('should generate a header then successfully parse it (app)', function (done) {
+ it('generates a header then successfully parse it (app)', function (done) {
var req = {
method: 'GET',
@@ -237,7 +299,7 @@ describe('Hawk', function () {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(artifacts.app).to.equal('asd23ased');
@@ -246,7 +308,7 @@ describe('Hawk', function () {
});
});
- it('should generate a header then successfully parse it (app, dlg)', function (done) {
+ it('generates a header then successfully parse it (app, dlg)', function (done) {
var req = {
method: 'GET',
@@ -260,7 +322,7 @@ describe('Hawk', function () {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(artifacts.app).to.equal('asd23ased');
@@ -270,7 +332,7 @@ describe('Hawk', function () {
});
});
- it('should generate a header then fail authentication due to bad hash', function (done) {
+ it('generates a header then fail authentication due to bad hash', function (done) {
var req = {
method: 'GET',
@@ -284,14 +346,14 @@ describe('Hawk', function () {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials, payload: 'hola!', ext: 'some-app-data' }).field;
Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Bad payload hash');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad payload hash');
done();
});
});
});
- it('should generate a header for one resource then fail to authenticate another', function (done) {
+ it('generates a header for one resource then fail to authenticate another', function (done) {
var req = {
method: 'GET',
@@ -307,8 +369,8 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(credentials).to.exist;
+ expect(err).to.exist();
+ expect(credentials).to.exist();
done();
});
});
diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/message.js b/deps/npm/node_modules/request/node_modules/hawk/test/message.js
index 04b91d4124..b0494cc456 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/test/message.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/test/message.js
@@ -1,9 +1,10 @@
// Load modules
var Url = require('url');
-var Lab = require('lab');
-var Hoek = require('hoek');
+var Code = require('code');
var Hawk = require('../lib');
+var Hoek = require('hoek');
+var Lab = require('lab');
// Declare internals
@@ -13,11 +14,10 @@ var internals = {};
// Test shortcuts
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
describe('Hawk', function () {
@@ -39,11 +39,11 @@ describe('Hawk', function () {
credentialsFunc('123456', function (err, credentials) {
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
- expect(auth).to.exist;
+ expect(auth).to.exist();
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
done();
});
@@ -55,11 +55,11 @@ describe('Hawk', function () {
credentialsFunc('123456', function (err, credentials) {
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
- expect(auth).to.exist;
+ expect(auth).to.exist();
Hawk.server.authenticateMessage('example1.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Bad mac');
done();
});
@@ -71,28 +71,43 @@ describe('Hawk', function () {
credentialsFunc('123456', function (err, credentials) {
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
- expect(auth).to.exist;
+ expect(auth).to.exist();
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { localtimeOffsetMsec: 100000 }, function (err, credentials) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Stale timestamp');
done();
});
});
});
+ it('overrides timestampSkewSec', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials, localtimeOffsetMsec: 100000 });
+ expect(auth).to.exist();
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { timestampSkewSec: 500 }, function (err, credentials) {
+
+ expect(err).to.not.exist();
+ done();
+ });
+ });
+ });
+
it('should fail authorization on invalid authorization', function (done) {
credentialsFunc('123456', function (err, credentials) {
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
- expect(auth).to.exist;
+ expect(auth).to.exist();
delete auth.id;
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Invalid authorization');
done();
});
@@ -104,11 +119,11 @@ describe('Hawk', function () {
credentialsFunc('123456', function (err, credentials) {
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
- expect(auth).to.exist;
+ expect(auth).to.exist();
Hawk.server.authenticateMessage('example.com', 8080, 'some message1', auth, credentialsFunc, {}, function (err, credentials) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Bad message hash');
done();
});
@@ -120,11 +135,11 @@ describe('Hawk', function () {
credentialsFunc('123456', function (err, credentials) {
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
- expect(auth).to.exist;
+ expect(auth).to.exist();
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, { nonceFunc: function (nonce, ts, callback) { callback (new Error('kaboom')); } }, function (err, credentials) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Invalid nonce');
done();
});
@@ -136,7 +151,7 @@ describe('Hawk', function () {
credentialsFunc('123456', function (err, credentials) {
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
- expect(auth).to.exist;
+ expect(auth).to.exist();
var errFunc = function (id, callback) {
@@ -145,7 +160,7 @@ describe('Hawk', function () {
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('kablooey');
done();
});
@@ -157,7 +172,7 @@ describe('Hawk', function () {
credentialsFunc('123456', function (err, credentials) {
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
- expect(auth).to.exist;
+ expect(auth).to.exist();
var errFunc = function (id, callback) {
@@ -166,7 +181,7 @@ describe('Hawk', function () {
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Unknown credentials');
done();
});
@@ -178,7 +193,7 @@ describe('Hawk', function () {
credentialsFunc('123456', function (err, credentials) {
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
- expect(auth).to.exist;
+ expect(auth).to.exist();
var errFunc = function (id, callback) {
@@ -187,7 +202,7 @@ describe('Hawk', function () {
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Invalid credentials');
done();
});
@@ -199,7 +214,7 @@ describe('Hawk', function () {
credentialsFunc('123456', function (err, credentials) {
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
- expect(auth).to.exist;
+ expect(auth).to.exist();
var errFunc = function (id, callback) {
@@ -208,7 +223,7 @@ describe('Hawk', function () {
Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, errFunc, {}, function (err, credentials) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Unknown algorithm');
done();
});
@@ -220,7 +235,7 @@ describe('Hawk', function () {
credentialsFunc('123456', function (err, credentials) {
var auth = Hawk.client.message(null, 8080, 'some message', { credentials: credentials });
- expect(auth).to.not.exist;
+ expect(auth).to.not.exist();
done();
});
});
@@ -228,7 +243,7 @@ describe('Hawk', function () {
it('should fail on missing credentials', function (done) {
var auth = Hawk.client.message('example.com', 8080, 'some message', {});
- expect(auth).to.not.exist;
+ expect(auth).to.not.exist();
done();
});
@@ -239,7 +254,7 @@ describe('Hawk', function () {
var creds = Hoek.clone(credentials);
creds.algorithm = 'blah';
var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: creds });
- expect(auth).to.not.exist;
+ expect(auth).to.not.exist();
done();
});
});
diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/readme.js b/deps/npm/node_modules/request/node_modules/hawk/test/readme.js
index f39e033d92..60af199832 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/test/readme.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/test/readme.js
@@ -1,8 +1,9 @@
// Load modules
-var Lab = require('lab');
-var Hoek = require('hoek');
+var Code = require('code');
var Hawk = require('../lib');
+var Hoek = require('hoek');
+var Lab = require('lab');
// Declare internals
@@ -12,11 +13,10 @@ var internals = {};
// Test shortcuts
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
describe('Hawk', function () {
diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/server.js b/deps/npm/node_modules/request/node_modules/hawk/test/server.js
index 3e92427a8d..00d7d085fe 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/test/server.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/test/server.js
@@ -1,8 +1,9 @@
// Load modules
var Url = require('url');
-var Lab = require('lab');
+var Code = require('code');
var Hawk = require('../lib');
+var Lab = require('lab');
// Declare internals
@@ -12,11 +13,10 @@ var internals = {};
// Test shortcuts
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
describe('Hawk', function () {
@@ -37,7 +37,7 @@ describe('Hawk', function () {
describe('#authenticate', function () {
- it('should parse a valid authentication header (sha1)', function (done) {
+ it('parses a valid authentication header (sha1)', function (done) {
var req = {
method: 'GET',
@@ -49,13 +49,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
done();
});
});
- it('should parse a valid authentication header (sha256)', function (done) {
+ it('parses a valid authentication header (sha256)', function (done) {
var req = {
method: 'GET',
@@ -67,13 +67,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
done();
});
});
- it('should parse a valid authentication header (host override)', function (done) {
+ it('parses a valid authentication header (host override)', function (done) {
var req = {
method: 'GET',
@@ -86,13 +86,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
done();
});
});
- it('should parse a valid authentication header (host port override)', function (done) {
+ it('parses a valid authentication header (host port override)', function (done) {
var req = {
method: 'GET',
@@ -105,13 +105,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { host: 'example.com', port: 8080, localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
done();
});
});
- it('should parse a valid authentication header (POST with payload)', function (done) {
+ it('parses a valid authentication header (POST with payload)', function (done) {
var req = {
method: 'POST',
@@ -123,13 +123,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1357926341000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
done();
});
});
- it('should fail on missing hash', function (done) {
+ it('errors on missing hash', function (done) {
var req = {
method: 'GET',
@@ -141,13 +141,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { payload: 'body', localtimeOffsetMsec: 1353832234000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Missing required payload hash');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing required payload hash');
done();
});
});
- it('should fail on a stale timestamp', function (done) {
+ it('errors on a stale timestamp', function (done) {
var req = {
method: 'GET',
@@ -159,9 +159,9 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Stale timestamp');
- var header = err.response.headers['WWW-Authenticate'];
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Stale timestamp');
+ var header = err.output.headers['WWW-Authenticate'];
var ts = header.match(/^Hawk ts\=\"(\d+)\"\, tsm\=\"([^\"]+)\"\, error=\"Stale timestamp\"$/);
var now = Hawk.utils.now();
expect(parseInt(ts[1], 10) * 1000).to.be.within(now - 1000, now + 1000);
@@ -177,7 +177,7 @@ describe('Hawk', function () {
});
});
- it('should fail on a replay', function (done) {
+ it('errors on a replay', function (done) {
var req = {
method: 'GET',
@@ -203,19 +203,19 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials, artifacts) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
Hawk.server.authenticate(req, credentialsFunc, options, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Invalid nonce');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid nonce');
done();
});
});
});
- it('should fail on an invalid authentication header: wrong scheme', function (done) {
+ it('errors on an invalid authentication header: wrong scheme', function (done) {
var req = {
method: 'GET',
@@ -227,13 +227,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.not.exist;
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.not.exist();
done();
});
});
- it('should fail on an invalid authentication header: no scheme', function (done) {
+ it('errors on an invalid authentication header: no scheme', function (done) {
var req = {
method: 'GET',
@@ -245,13 +245,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Invalid header syntax');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid header syntax');
done();
});
});
- it('should fail on an missing authorization header', function (done) {
+ it('errors on an missing authorization header', function (done) {
var req = {
method: 'GET',
@@ -262,13 +262,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.isMissing).to.equal(true);
done();
});
});
- it('should fail on an missing host header', function (done) {
+ it('errors on an missing host header', function (done) {
var req = {
method: 'GET',
@@ -280,13 +280,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Invalid Host header');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid Host header');
done();
});
});
- it('should fail on an missing authorization attribute (id)', function (done) {
+ it('errors on an missing authorization attribute (id)', function (done) {
var req = {
method: 'GET',
@@ -298,13 +298,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Missing attributes');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing attributes');
done();
});
});
- it('should fail on an missing authorization attribute (ts)', function (done) {
+ it('errors on an missing authorization attribute (ts)', function (done) {
var req = {
method: 'GET',
@@ -316,13 +316,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Missing attributes');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing attributes');
done();
});
});
- it('should fail on an missing authorization attribute (nonce)', function (done) {
+ it('errors on an missing authorization attribute (nonce)', function (done) {
var req = {
method: 'GET',
@@ -334,13 +334,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Missing attributes');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing attributes');
done();
});
});
- it('should fail on an missing authorization attribute (mac)', function (done) {
+ it('errors on an missing authorization attribute (mac)', function (done) {
var req = {
method: 'GET',
@@ -352,13 +352,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Missing attributes');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing attributes');
done();
});
});
- it('should fail on an unknown authorization attribute', function (done) {
+ it('errors on an unknown authorization attribute', function (done) {
var req = {
method: 'GET',
@@ -370,13 +370,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Unknown attribute: x');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Unknown attribute: x');
done();
});
});
- it('should fail on an bad authorization header format', function (done) {
+ it('errors on an bad authorization header format', function (done) {
var req = {
method: 'GET',
@@ -388,13 +388,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Bad header format');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad header format');
done();
});
});
- it('should fail on an bad authorization attribute value', function (done) {
+ it('errors on an bad authorization attribute value', function (done) {
var req = {
method: 'GET',
@@ -406,13 +406,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Bad attribute value: id');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad attribute value: id');
done();
});
});
- it('should fail on an empty authorization attribute value', function (done) {
+ it('errors on an empty authorization attribute value', function (done) {
var req = {
method: 'GET',
@@ -424,13 +424,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Bad attribute value: id');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad attribute value: id');
done();
});
});
- it('should fail on duplicated authorization attribute key', function (done) {
+ it('errors on duplicated authorization attribute key', function (done) {
var req = {
method: 'GET',
@@ -442,13 +442,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Duplicate attribute: id');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Duplicate attribute: id');
done();
});
});
- it('should fail on an invalid authorization header format', function (done) {
+ it('errors on an invalid authorization header format', function (done) {
var req = {
method: 'GET',
@@ -460,13 +460,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Invalid header syntax');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid header syntax');
done();
});
});
- it('should fail on an bad host header (missing host)', function (done) {
+ it('errors on an bad host header (missing host)', function (done) {
var req = {
method: 'GET',
@@ -479,13 +479,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Invalid Host header');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid Host header');
done();
});
});
- it('should fail on an bad host header (pad port)', function (done) {
+ it('errors on an bad host header (pad port)', function (done) {
var req = {
method: 'GET',
@@ -498,13 +498,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Invalid Host header');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid Host header');
done();
});
});
- it('should fail on credentialsFunc error', function (done) {
+ it('errors on credentialsFunc error', function (done) {
var req = {
method: 'GET',
@@ -521,13 +521,37 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
+ expect(err).to.exist();
+ expect(err.message).to.equal('Unknown user');
+ done();
+ });
+ });
+
+ it('errors on credentialsFunc error (with credentials)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ var credentialsFunc = function (id, callback) {
+
+ return callback(new Error('Unknown user'), { some: 'value' });
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
expect(err.message).to.equal('Unknown user');
+ expect(credentials.some).to.equal('value');
done();
});
});
- it('should fail on missing credentials', function (done) {
+ it('errors on missing credentials', function (done) {
var req = {
method: 'GET',
@@ -544,13 +568,13 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Unknown credentials');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Unknown credentials');
done();
});
});
- it('should fail on invalid credentials', function (done) {
+ it('errors on invalid credentials (id)', function (done) {
var req = {
method: 'GET',
@@ -572,14 +596,43 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Invalid credentials');
- expect(err.response.payload.message).to.equal('An internal server error occurred');
+ expect(err.output.payload.message).to.equal('An internal server error occurred');
done();
});
});
- it('should fail on unknown credentials algorithm', function (done) {
+ it('errors on invalid credentials (key)', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?filter=a',
+ host: 'example.com',
+ port: 8080,
+ authorization: 'Hawk id="123", ts="1353788437", nonce="k3j4h2", mac="/qwS4UjfVWMcUyW6EEgUH4jlr7T/wuKe3dKijvTvSos=", ext="hello"'
+ };
+
+ var credentialsFunc = function (id, callback) {
+
+ var credentials = {
+ id: '23434d3q4d5345d',
+ user: 'steve'
+ };
+
+ return callback(null, credentials);
+ };
+
+ Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid credentials');
+ expect(err.output.payload.message).to.equal('An internal server error occurred');
+ done();
+ });
+ });
+
+ it('errors on unknown credentials algorithm', function (done) {
var req = {
method: 'GET',
@@ -602,14 +655,14 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Unknown algorithm');
- expect(err.response.payload.message).to.equal('An internal server error occurred');
+ expect(err.output.payload.message).to.equal('An internal server error occurred');
done();
});
});
- it('should fail on unknown bad mac', function (done) {
+ it('errors on unknown bad mac', function (done) {
var req = {
method: 'GET',
@@ -632,8 +685,8 @@ describe('Hawk', function () {
Hawk.server.authenticate(req, credentialsFunc, { localtimeOffsetMsec: 1353788437000 - Hawk.utils.now() }, function (err, credentials, artifacts) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Bad mac');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad mac');
done();
});
});
@@ -641,46 +694,292 @@ describe('Hawk', function () {
describe('#header', function () {
- it('should return an empty authorization header on missing options', function (done) {
+ it('generates header', function (done) {
- var header = Hawk.server.header();
- expect(header).to.equal('');
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(header).to.equal('Hawk mac=\"n14wVJK4cOxAytPUMc5bPezQzuJGl5n7MYXhFQgEKsE=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\", ext=\"response-specific\"');
+ done();
+ });
+
+ it('generates header (empty payload)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var header = Hawk.server.header(credentials, artifacts, { payload: '', contentType: 'text/plain', ext: 'response-specific' });
+ expect(header).to.equal('Hawk mac=\"i8/kUBDx0QF+PpCtW860kkV/fa9dbwEoe/FpGUXowf0=\", hash=\"q/t+NNAkQZNlq/aAD6PlexImwQTxwgT2MahfTa9XRLA=\", ext=\"response-specific\"');
+ done();
+ });
+
+ it('generates header (pre calculated hash)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var options = { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' };
+ options.hash = Hawk.crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
+ var header = Hawk.server.header(credentials, artifacts, options);
+ expect(header).to.equal('Hawk mac=\"n14wVJK4cOxAytPUMc5bPezQzuJGl5n7MYXhFQgEKsE=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\", ext=\"response-specific\"');
+ done();
+ });
+
+ it('generates header (null ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: null });
+ expect(header).to.equal('Hawk mac=\"6PrybJTJs20jsgBw5eilXpcytD8kUbaIKNYXL+6g0ns=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\"');
done();
});
- it('should return an empty authorization header on missing credentials', function (done) {
+ it('errors on missing artifacts', function (done) {
- var header = Hawk.server.header(null, {});
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
+ };
+
+ var header = Hawk.server.header(credentials, null, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
expect(header).to.equal('');
done();
});
- it('should return an empty authorization header on invalid credentials', function (done) {
+ it('errors on invalid artifacts', function (done) {
var credentials = {
- key: '2983d45yun89q'
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'sha256',
+ user: 'steve'
};
- var header = Hawk.server.header(credentials);
+ var header = Hawk.server.header(credentials, 5, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
expect(header).to.equal('');
done();
});
- it('should return an empty authorization header on invalid algorithm', function (done) {
+ it('errors on missing credentials', function (done) {
var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
id: '123456'
};
+ var header = Hawk.server.header(null, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(header).to.equal('');
+ done();
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
var credentials = {
- key: '2983d45yun89q',
- algorithm: 'hmac-sha-0'
+ id: '123456',
+ algorithm: 'sha256',
+ user: 'steve'
};
- var header = Hawk.server.header(credentials, artifacts);
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
expect(header).to.equal('');
done();
});
+
+ it('errors on invalid algorithm', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
+ algorithm: 'x',
+ user: 'steve'
+ };
+
+ var artifacts = {
+ method: 'POST',
+ host: 'example.com',
+ port: '8080',
+ resource: '/resource/4?filter=a',
+ ts: '1398546787',
+ nonce: 'xUwusx',
+ hash: 'nJjkVtBE5Y/Bk38Aiokwn0jiJxt/0S2WRSUwWLCf5xk=',
+ ext: 'some-app-data',
+ mac: 'dvIvMThwi28J61Jc3P0ryAhuKpanU63GXdx6hkmQkJA=',
+ id: '123456'
+ };
+
+ var header = Hawk.server.header(credentials, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
+ expect(header).to.equal('');
+ done();
+ });
+ });
+
+ describe('#authenticateMessage', function () {
+
+ it('errors on invalid authorization (ts)', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
+ delete auth.ts;
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid authorization');
+ done();
+ });
+ });
+ });
+
+ it('errors on invalid authorization (nonce)', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
+ delete auth.nonce;
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid authorization');
+ done();
+ });
+ });
+ });
+
+ it('errors on invalid authorization (hash)', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
+ delete auth.hash;
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, credentialsFunc, {}, function (err, credentials) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('Invalid authorization');
+ done();
+ });
+ });
+ });
+
+ it('errors with credentials', function (done) {
+
+ credentialsFunc('123456', function (err, credentials) {
+
+ var auth = Hawk.client.message('example.com', 8080, 'some message', { credentials: credentials });
+
+ Hawk.server.authenticateMessage('example.com', 8080, 'some message', auth, function (id, callback) { callback(new Error('something'), { some: 'value' }); }, {}, function (err, credentials) {
+
+ expect(err).to.exist();
+ expect(err.message).to.equal('something');
+ expect(credentials.some).to.equal('value');
+ done();
+ });
+ });
+ });
+ });
+
+ describe('#authenticatePayloadHash', function () {
+
+ it('checks payload hash', function (done) {
+
+ expect(Hawk.server.authenticatePayloadHash('abcdefg', { hash: 'abcdefg' })).to.equal(true);
+ expect(Hawk.server.authenticatePayloadHash('1234567', { hash: 'abcdefg' })).to.equal(false);
+ done();
+ });
});
});
});
diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/uri.js b/deps/npm/node_modules/request/node_modules/hawk/test/uri.js
index 44ffd7fb08..e64b0095b2 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/test/uri.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/test/uri.js
@@ -1,8 +1,11 @@
// Load modules
var Http = require('http');
-var Lab = require('lab');
+var Url = require('url');
+var Code = require('code');
var Hawk = require('../lib');
+var Hoek = require('hoek');
+var Lab = require('lab');
// Declare internals
@@ -12,11 +15,10 @@ var internals = {};
// Test shortcuts
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
describe('Hawk', function () {
@@ -51,7 +53,7 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(attributes.ext).to.equal('some-app-data');
done();
@@ -75,7 +77,7 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
done();
});
@@ -93,7 +95,7 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(attributes.ext).to.equal('some-app-data');
done();
@@ -111,7 +113,7 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(attributes.ext).to.equal('some-app-data');
done();
@@ -129,7 +131,7 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.not.exist;
+ expect(err).to.not.exist();
expect(credentials.user).to.equal('steve');
expect(attributes.ext).to.equal('some-app-data');
done();
@@ -148,8 +150,8 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Multiple authentications');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Multiple authentications');
done();
});
});
@@ -179,12 +181,12 @@ describe('Hawk', function () {
var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + ext;
- req.url += '&bewit=' + Hawk.utils.base64urlEncode(bewit);
+ req.url += '&bewit=' + Hoek.base64urlEncode(bewit);
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Invalid method');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid method');
done();
});
});
@@ -202,8 +204,8 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Invalid Host header');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid Host header');
done();
});
});
@@ -219,9 +221,9 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Empty bewit');
- expect(err.isMissing).to.not.exist;
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Empty bewit');
+ expect(err.isMissing).to.not.exist();
done();
});
});
@@ -237,9 +239,9 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Invalid bewit encoding');
- expect(err.isMissing).to.not.exist;
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid bewit encoding');
+ expect(err.isMissing).to.not.exist();
done();
});
});
@@ -255,8 +257,8 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.not.exist;
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.not.exist();
expect(err.isMissing).to.equal(true);
done();
});
@@ -273,8 +275,8 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Invalid bewit structure');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Invalid bewit structure');
done();
});
});
@@ -290,12 +292,29 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Missing bewit attributes');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing bewit attributes');
done();
});
});
+ it('should fail on missing bewit id attribute', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=XDQ1NTIxNDc2MjJcK0JFbFhQMXhuWjcvd1Nrbm1ldGhlZm5vUTNHVjZNSlFVRHk4NWpTZVJ4VT1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Missing bewit attributes');
+ done();
+ });
+ });
+
it('should fail on expired access', function (done) {
var req = {
@@ -307,8 +326,8 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, credentialsFunc, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Access expired');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Access expired');
done();
});
});
@@ -324,8 +343,26 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, function (id, callback) { callback(Hawk.error.badRequest('Boom')); }, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Boom');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Boom');
+ done();
+ });
+ });
+
+ it('should fail on credentials function error with credentials', function (done) {
+
+ var req = {
+ method: 'GET',
+ url: '/resource/4?bewit=MTIzNDU2XDQ1MDk5OTE3MTlcTUE2eWkwRWRwR0pEcWRwb0JkYVdvVDJrL0hDSzA1T0Y3MkhuZlVmVy96Zz1cc29tZS1hcHAtZGF0YQ',
+ host: 'example.com',
+ port: 8080
+ };
+
+ Hawk.uri.authenticate(req, function (id, callback) { callback(Hawk.error.badRequest('Boom'), { some: 'value' }); }, {}, function (err, credentials, attributes) {
+
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Boom');
+ expect(credentials.some).to.equal('value');
done();
});
});
@@ -341,8 +378,8 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, function (id, callback) { callback(null, null); }, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Unknown credentials');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Unknown credentials');
done();
});
});
@@ -358,7 +395,7 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, function (id, callback) { callback(null, {}); }, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Invalid credentials');
done();
});
@@ -375,7 +412,7 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, function (id, callback) { callback(null, { key: 'xxx', algorithm: 'xxx' }); }, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
+ expect(err).to.exist();
expect(err.message).to.equal('Unknown algorithm');
done();
});
@@ -392,8 +429,8 @@ describe('Hawk', function () {
Hawk.uri.authenticate(req, function (id, callback) { callback(null, { key: 'xxx', algorithm: 'sha256' }); }, {}, function (err, credentials, attributes) {
- expect(err).to.exist;
- expect(err.response.payload.message).to.equal('Bad mac');
+ expect(err).to.exist();
+ expect(err.output.payload.message).to.equal('Bad mac');
done();
});
});
@@ -401,7 +438,7 @@ describe('Hawk', function () {
describe('#getBewit', function () {
- it('should return a valid bewit value', function (done) {
+ it('returns a valid bewit value', function (done) {
var credentials = {
id: '123456',
@@ -414,19 +451,116 @@ describe('Hawk', function () {
done();
});
- it('should return an empty bewit on invalid credentials', function (done) {
+ it('returns a valid bewit value (explicit port)', function (done) {
var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit('https://example.com:8080/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcaFpiSjNQMmNLRW80a3kwQzhqa1pBa1J5Q1p1ZWc0V1NOYnhWN3ZxM3hIVT1ceGFuZHlhbmR6');
+ done();
+ });
+
+ it('returns a valid bewit value (null ext)', function (done) {
+
+ var credentials = {
+ id: '123456',
key: '2983d45yun89q',
algorithm: 'sha256'
};
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: null });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdcSUdZbUxnSXFMckNlOEN4dktQczRKbFdJQStValdKSm91d2dBUmlWaENBZz1c');
+ done();
+ });
+
+ it('returns a valid bewit value (parsed uri)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit(Url.parse('https://example.com/somewhere/over/the/rainbow'), { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('MTIzNDU2XDEzNTY0MjA3MDdca3NjeHdOUjJ0SnBQMVQxekRMTlBiQjVVaUtJVTl0T1NKWFRVZEc3WDloOD1ceGFuZHlhbmR6');
+ done();
+ });
+
+ it('errors on invalid options', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', 4);
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on missing uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit('', { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid uri', function (done) {
+
+ var credentials = {
+ id: '123456',
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit(5, { credentials: credentials, ttlSec: 300, localtimeOffsetMsec: 1356420407232 - Hawk.utils.now(), ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid credentials (id)', function (done) {
+
+ var credentials = {
+ key: '2983d45yun89q',
+ algorithm: 'sha256'
+ };
+
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on missing credentials', function (done) {
+
+ var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { ttlSec: 3000, ext: 'xandyandz' });
+ expect(bewit).to.equal('');
+ done();
+ });
+
+ it('errors on invalid credentials (key)', function (done) {
+
+ var credentials = {
+ id: '123456',
+ algorithm: 'sha256'
+ };
+
var bewit = Hawk.uri.getBewit('https://example.com/somewhere/over/the/rainbow', { credentials: credentials, ttlSec: 3000, ext: 'xandyandz' });
expect(bewit).to.equal('');
done();
});
- it('should return an empty bewit on invalid algorithm', function (done) {
+ it('errors on invalid algorithm', function (done) {
var credentials = {
id: '123456',
@@ -439,7 +573,7 @@ describe('Hawk', function () {
done();
});
- it('should return an empty bewit on missing options', function (done) {
+ it('errors on missing options', function (done) {
var credentials = {
id: '123456',
diff --git a/deps/npm/node_modules/request/node_modules/hawk/test/utils.js b/deps/npm/node_modules/request/node_modules/hawk/test/utils.js
index 0f5fef7754..9ccda8be37 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/test/utils.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/test/utils.js
@@ -1,7 +1,8 @@
// Load modules
-var Lab = require('lab');
+var Code = require('code');
var Hawk = require('../lib');
+var Lab = require('lab');
var Package = require('../package.json');
@@ -12,11 +13,10 @@ var internals = {};
// Test shortcuts
-var expect = Lab.expect;
-var before = Lab.before;
-var after = Lab.after;
-var describe = Lab.experiment;
-var it = Lab.test;
+var lab = exports.lab = Lab.script();
+var describe = lab.experiment;
+var it = lab.test;
+var expect = Code.expect;
describe('Hawk', function () {
@@ -110,7 +110,7 @@ describe('Hawk', function () {
it('returns a hawk 401', function (done) {
- expect(Hawk.utils.unauthorized('kaboom').response.headers['WWW-Authenticate']).to.equal('Hawk error="kaboom"');
+ expect(Hawk.utils.unauthorized('kaboom').output.headers['WWW-Authenticate']).to.equal('Hawk error="kaboom"');
done();
});
});
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/README.md b/deps/npm/node_modules/request/node_modules/http-signature/README.md
index 0c7071492c..de487d3236 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/README.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/README.md
@@ -6,61 +6,65 @@ for Joyent's [HTTP Signature Scheme](http_signing.md).
## Usage
Note the example below signs a request with the same key/cert used to start an
-HTTP server. This is almost certainly not what you actaully want, but is just
+HTTP server. This is almost certainly not what you actually want, but is just
used to illustrate the API calls; you will need to provide your own key
management in addition to this library.
### Client
- var fs = require('fs');
- var https = require('https');
- var httpSignature = require('http-signature');
+```js
+var fs = require('fs');
+var https = require('https');
+var httpSignature = require('http-signature');
- var key = fs.readFileSync('./key.pem', 'ascii');
+var key = fs.readFileSync('./key.pem', 'ascii');
- var options = {
- host: 'localhost',
- port: 8443,
- path: '/',
- method: 'GET',
- headers: {}
- };
+var options = {
+ host: 'localhost',
+ port: 8443,
+ path: '/',
+ method: 'GET',
+ headers: {}
+};
- // Adds a 'Date' header in, signs it, and adds the
- // 'Authorization' header in.
- var req = https.request(options, function(res) {
- console.log(res.statusCode);
- });
+// Adds a 'Date' header in, signs it, and adds the
+// 'Authorization' header in.
+var req = https.request(options, function(res) {
+ console.log(res.statusCode);
+});
- httpSignature.sign(req, {
- key: key,
- keyId: './cert.pem'
- });
+httpSignature.sign(req, {
+ key: key,
+ keyId: './cert.pem'
+});
- req.end();
+req.end();
+```
### Server
- var fs = require('fs');
- var https = require('https');
- var httpSignature = require('http-signature');
-
- var options = {
- key: fs.readFileSync('./key.pem'),
- cert: fs.readFileSync('./cert.pem')
- };
-
- https.createServer(options, function (req, res) {
- var rc = 200;
- var parsed = httpSignature.parseRequest(req);
- var pub = fs.readFileSync(parsed.keyId, 'ascii');
- if (!httpSignature.verifySignature(parsed, pub))
- rc = 401;
-
- res.writeHead(rc);
- res.end();
- }).listen(8443);
+```js
+var fs = require('fs');
+var https = require('https');
+var httpSignature = require('http-signature');
+
+var options = {
+ key: fs.readFileSync('./key.pem'),
+ cert: fs.readFileSync('./cert.pem')
+};
+
+https.createServer(options, function (req, res) {
+ var rc = 200;
+ var parsed = httpSignature.parseRequest(req);
+ var pub = fs.readFileSync(parsed.keyId, 'ascii');
+ if (!httpSignature.verifySignature(parsed, pub))
+ rc = 401;
+
+ res.writeHead(rc);
+ res.end();
+}).listen(8443);
+```
## Installation
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/http_signing.md b/deps/npm/node_modules/request/node_modules/http-signature/http_signing.md
index ba7321da15..dd81ee5b59 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/http_signing.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/http_signing.md
@@ -17,7 +17,7 @@ This protocol is intended to provide a standard way for clients to sign HTTP
requests. RFC2617 (HTTP Authentication) defines Basic and Digest authentication
mechanisms, and RFC5246 (TLS 1.2) defines client-auth, both of which are widely
employed on the Internet today. However, it is common place that the burdens of
-PKI prevent web service operators from deploying that methodoloy, and so many
+PKI prevent web service operators from deploying that methodology, and so many
fall back to Basic authentication, which has poor security characteristics.
Additionally, OAuth provides a fully-specified alternative for authorization
@@ -109,14 +109,14 @@ the values of each HTTP header specified by `headers` in the order they appear.
1. If the header name is not `request-line` then append the lowercased header
name followed with an ASCII colon `:` and an ASCII space ` `.
-2. If the header name is `request-line` then appened the HTTP request line,
+2. If the header name is `request-line` then append the HTTP request line,
otherwise append the header value.
3. If value is not the last value then append an ASCII newline `\n`. The string
MUST NOT include a trailing ASCII newline.
# Example Requests
-All requests refer to the following request (body ommitted):
+All requests refer to the following request (body omitted):
POST /foo HTTP/1.1
Host: example.org
@@ -182,7 +182,7 @@ Currently supported algorithm names are:
Note the default parameterization of the `Signature` scheme is only safe if all
requests are carried over a secure transport (i.e., TLS). Sending the default
scheme over a non-secure transport will leave the request vulnerable to
-spoofing, tampering, replay/repudiaton, and integrity violations (if using the
+spoofing, tampering, replay/repudiation, and integrity violations (if using the
STRIDE threat-modeling methodology).
## Insecure Transports
@@ -195,7 +195,7 @@ against any tampering from clients.
## Nonces
Nonces are out of scope for this document simply because many service providers
-fail to implement them correctly, or do not adopt security specfiications
+fail to implement them correctly, or do not adopt security specifications
because of the infrastructure complexity. Given the `header` parameterization,
a service provider is fully enabled to add nonce semantics into this scheme by
using something like an `x-request-nonce` header, and ensuring it is signed
@@ -234,12 +234,12 @@ will want to enforce, but service providers SHOULD at minimum include the
The following test data uses the RSA (2048b) keys, which we will refer
to as `keyId=Test` in the following samples:
- -----BEGIN PUBLIC KEY-----
- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3
- 6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6
- Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw
- oYi+1hqp1fIekaxsyQIDAQAB
- -----END PUBLIC KEY-----
+ -----BEGIN PUBLIC KEY-----
+ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3
+ 6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6
+ Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw
+ oYi+1hqp1fIekaxsyQIDAQAB
+ -----END PUBLIC KEY-----
-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF
@@ -276,7 +276,7 @@ The string to sign would be:
The Authorization header would be:
- Authorization: Signature keyId="Test",algorithm="rsa-sha256",signature="JldXnt8W9t643M2Sce10gqCh/+E7QIYLiI+bSjnFBGCti7s+mPPvOjVb72sbd1FjeOUwPTDpKbrQQORrm+xBYfAwCxF3LBSSzORvyJ5nRFCFxfJ3nlQD6Kdxhw8wrVZX5nSem4A/W3C8qH5uhFTRwF4ruRjh+ENHWuovPgO/HGQ="
+ Authorization: Signature keyId="Test",algorithm="rsa-sha256",signature="ATp0r26dbMIxOopqw0OfABDT7CKMIoENumuruOtarj8n/97Q3htHFYpH8yOSQk3Z5zh8UxUym6FYTb5+A0Nz3NRsXJibnYi7brE/4tx5But9kkFGzG+xpUmimN4c3TMN7OFH//+r8hBf7BT9/GmHDUVZT2JzWGLZES2xDOUuMtA="
### All Headers
@@ -292,5 +292,5 @@ inserted for readability):
The Authorization header would be:
- Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="request-line host date content-type content-md5 content-length",signature="Gm7W/r+e90REDpWytALMrft4MqZxCmslOTOvwJX17ViEBA5E65QqvWI0vIH3l/vSsGiaMVmuUgzYsJLYMLcm5dGrv1+a+0fCoUdVKPZWHyImQEqpLkopVwqEH67LVECFBqFTAKlQgBn676zrfXQbb+b/VebAsNUtvQMe6cTjnDY="
+ Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="request-line host date content-type content-md5 content-length",signature="H/AaTDkJvLELy4i1RujnKlS6dm8QWiJvEpn9cKRMi49kKF+mohZ15z1r+mF+XiKS5kOOscyS83olfBtsVhYjPg2Ei3/D9D4Mvb7bFm9IaLJgYTFFuQCghrKQQFPiqJN320emjHxFowpIm1BkstnEU7lktH/XdXVBo8a6Uteiztw="
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/lib/index.js b/deps/npm/node_modules/request/node_modules/http-signature/lib/index.js
index 3ac70b77f2..217a5ddeb8 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/lib/index.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/lib/index.js
@@ -19,6 +19,7 @@ module.exports = {
sshKeyToPEM: util.sshKeyToPEM,
sshKeyFingerprint: util.fingerprint,
+ pemToRsaSSHKey: util.pemToRsaSSHKey,
verify: verify.verifySignature,
verifySignature: verify.verifySignature
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/lib/signer.js b/deps/npm/node_modules/request/node_modules/http-signature/lib/signer.js
index 8095f0d179..3507f4dbfd 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/lib/signer.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/lib/signer.js
@@ -146,7 +146,6 @@ module.exports = {
}
stringToSign += h + ': ' + value;
} else {
- value =
stringToSign +=
request.method + ' ' + request.path + ' HTTP/' + options.httpVersion;
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/lib/util.js b/deps/npm/node_modules/request/node_modules/http-signature/lib/util.js
index 30bbf045d4..e7d915e768 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/lib/util.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/lib/util.js
@@ -243,7 +243,62 @@ module.exports = {
}
return fp;
- }
-
+ },
+ /**
+ * Converts a PKGCS#8 PEM file to an OpenSSH public key (rsa)
+ *
+ * The reverse of the above function.
+ */
+ pemToRsaSSHKey: function pemToRsaSSHKey(pem, comment) {
+ assert.equal('string', typeof pem, 'typeof pem');
+
+ // chop off the BEGIN PUBLIC KEY and END PUBLIC KEY portion
+ var cleaned = pem.split('\n').slice(1, -2).join('');
+
+ var buf = new Buffer(cleaned, 'base64');
+
+ var der = new asn1.BerReader(buf);
+
+ der.readSequence();
+ der.readSequence();
+
+ var oid = der.readOID();
+ assert.equal(oid, '1.2.840.113549.1.1.1', 'pem not in RSA format');
+
+ // Null -- XXX this probably isn't good practice
+ der.readByte();
+ der.readByte();
+
+ // bit string sequence
+ der.readSequence(0x03);
+ der.readByte();
+ der.readSequence();
+
+ // modulus
+ assert.equal(der.peek(), asn1.Ber.Integer, 'modulus not an integer');
+ der._offset = der.readLength(der.offset + 1);
+ var modulus = der._buf.slice(der.offset, der.offset + der.length);
+ der._offset += der.length;
+
+ // exponent
+ assert.equal(der.peek(), asn1.Ber.Integer, 'exponent not an integer');
+ der._offset = der.readLength(der.offset + 1);
+ var exponent = der._buf.slice(der.offset, der.offset + der.length);
+ der._offset += der.length;
+
+ // now, make the key
+ var type = new Buffer('ssh-rsa');
+ var buffer = new Buffer(4 + type.length + 4 + modulus.length + 4 + exponent.length);
+ var i = 0;
+ buffer.writeUInt32BE(type.length, i); i += 4;
+ type.copy(buffer, i); i += type.length;
+ buffer.writeUInt32BE(exponent.length, i); i += 4;
+ exponent.copy(buffer, i); i += exponent.length;
+ buffer.writeUInt32BE(modulus.length, i); i += 4;
+ modulus.copy(buffer, i); i += modulus.length;
+
+ var s = type.toString() + ' ' + buffer.toString('base64') + ' ' + (comment || '');
+ return s;
+ }
};
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 abd8125afc..8c68193cd1 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
@@ -32,14 +32,32 @@
"pretest": "which gjslint; if [[ \"$?\" = 0 ]] ; then gjslint --nojsdoc -r lib -r tst; else echo \"Missing gjslint. Skipping lint\"; fi",
"test": "tap ./tst"
},
- "readme": "node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS.\nCurrently BER encoding is supported; at some point I'll likely have to do DER.\n\n## Usage\n\nMostly, if you're *actually* needing to read and write ASN.1, you probably don't\nneed this readme to explain what and why. If you have no idea what ASN.1 is,\nsee this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc\n\nThe source is pretty much self-explanatory, and has read/write methods for the\ncommon types out there.\n\n### Decoding\n\nThe following reads an ASN.1 sequence with a boolean.\n\n var Ber = require('asn1').Ber;\n\n var reader = new Ber.Reader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff]));\n\n reader.readSequence();\n console.log('Sequence len: ' + reader.length);\n if (reader.peek() === Ber.Boolean)\n console.log(reader.readBoolean());\n\n### Encoding\n\nThe following generates the same payload as above.\n\n var Ber = require('asn1').Ber;\n\n var writer = new Ber.Writer();\n\n writer.startSequence();\n writer.writeBoolean(true);\n writer.endSequence();\n\n console.log(writer.buffer);\n\n## Installation\n\n npm install asn1\n\n## License\n\nMIT.\n\n## Bugs\n\nSee <https://github.com/mcavage/node-asn1/issues>.\n",
- "readmeFilename": "README.md",
- "bugs": {
- "url": "https://github.com/mcavage/node-asn1/issues"
+ "_npmUser": {
+ "name": "mcavage",
+ "email": "mcavage@gmail.com"
},
- "homepage": "https://github.com/mcavage/node-asn1",
"_id": "asn1@0.1.11",
+ "_engineSupported": true,
+ "_npmVersion": "1.1.0-beta-4",
+ "_nodeVersion": "v0.6.6",
+ "_defaultsLoaded": true,
+ "dist": {
+ "shasum": "559be18376d08a4ec4dbe80877d27818639b2df7",
+ "tarball": "http://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "mcavage",
+ "email": "mcavage@gmail.com"
+ }
+ ],
+ "directories": {},
"_shasum": "559be18376d08a4ec4dbe80877d27818639b2df7",
"_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz",
- "_from": "asn1@0.1.11"
+ "_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"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js
index 70583f12d3..ff2ba02de8 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/assert.js
@@ -9,6 +9,7 @@ var util = require('util');
///--- Globals
var NDEBUG = process.env.NODE_NDEBUG || false;
+var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
@@ -53,6 +54,28 @@ function _assert(arg, type, name, stackFunc) {
}
+function _instanceof(arg, type, name, stackFunc) {
+ if (!NDEBUG) {
+ name = name || type;
+ stackFunc = stackFunc || _instanceof.caller;
+
+ if (!(arg instanceof type)) {
+ throw new assert.AssertionError({
+ message: _(TYPE_REQUIRED, name, type.name),
+ actual: _getClass(arg),
+ expected: type.name,
+ operator: 'instanceof',
+ stackStartFunction: stackFunc
+ });
+ }
+ }
+}
+
+function _getClass(object) {
+ return (Object.prototype.toString.call(object).slice(8, -1));
+};
+
+
///--- API
@@ -85,7 +108,7 @@ function bool(arg, name) {
function buffer(arg, name) {
if (!Buffer.isBuffer(arg)) {
throw new assert.AssertionError({
- message: _(TYPE_REQUIRED, name, type),
+ message: _(TYPE_REQUIRED, name || '', 'Buffer'),
actual: typeof (arg),
expected: 'buffer',
operator: 'Buffer.isBuffer',
@@ -102,6 +125,15 @@ function func(arg, name) {
function number(arg, name) {
_assert(arg, 'number', name);
+ if (!NDEBUG && (isNaN(arg) || !isFinite(arg))) {
+ throw new assert.AssertionError({
+ message: _(TYPE_REQUIRED, name, 'number'),
+ actual: arg,
+ expected: 'number',
+ operator: 'isNaN',
+ stackStartFunction: number
+ });
+ }
}
@@ -111,15 +143,16 @@ function object(arg, name) {
function stream(arg, name) {
- if (!(arg instanceof Stream)) {
- throw new assert.AssertionError({
- message: _(TYPE_REQUIRED, name, type),
- actual: typeof (arg),
- expected: 'Stream',
- operator: 'instanceof',
- stackStartFunction: buffer
- });
- }
+ _instanceof(arg, Stream, name);
+}
+
+
+function date(arg, name) {
+ _instanceof(arg, Date, name);
+}
+
+function regexp(arg, name) {
+ _instanceof(arg, RegExp, name);
}
@@ -128,17 +161,33 @@ function string(arg, name) {
}
+function uuid(arg, name) {
+ string(arg, name);
+ if (!NDEBUG && !UUID_REGEXP.test(arg)) {
+ throw new assert.AssertionError({
+ message: _(TYPE_REQUIRED, name, 'uuid'),
+ actual: 'string',
+ expected: 'uuid',
+ operator: 'test',
+ stackStartFunction: uuid
+ });
+ }
+}
+
///--- Exports
module.exports = {
bool: bool,
buffer: buffer,
+ date: date,
func: func,
number: number,
object: object,
+ regexp: regexp,
stream: stream,
- string: string
+ string: string,
+ uuid: uuid
};
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 99d9d48ab8..1b935b6b42 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
@@ -5,19 +5,42 @@
},
"name": "assert-plus",
"description": "Extra assertions on top of node's assert module",
- "version": "0.1.2",
+ "version": "0.1.5",
"main": "./assert.js",
- "dependencies": {},
"devDependencies": {},
"optionalDependencies": {},
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mcavage/node-assert-plus.git"
+ },
"engines": {
- "node": ">=0.6"
+ "node": ">=0.8"
+ },
+ "bugs": {
+ "url": "https://github.com/mcavage/node-assert-plus/issues"
+ },
+ "dependencies": {},
+ "_id": "assert-plus@0.1.5",
+ "dist": {
+ "shasum": "ee74009413002d84cec7219c6ac811812e723160",
+ "tarball": "http://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz"
+ },
+ "_from": "assert-plus@>=0.1.5 <0.2.0",
+ "_npmVersion": "1.3.11",
+ "_npmUser": {
+ "name": "mcavage",
+ "email": "mcavage@gmail.com"
},
- "readme": "# node-assert-plus\n\nThis library is a super small wrapper over node's assert module that has two\nthings: (1) the ability to disable assertions with the environment variable\nNODE_NDEBUG, and (2) some API wrappers for argument testing. Like\n`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks\nlike this:\n\n var assert = require('assert-plus');\n\n function fooAccount(options, callback) {\n\t assert.object(options, 'options');\n\t\tassert.number(options.id, 'options.id);\n\t\tassert.bool(options.isManager, 'options.isManager');\n\t\tassert.string(options.name, 'options.name');\n\t\tassert.arrayOfString(options.email, 'options.email');\n\t\tassert.func(callback, 'callback');\n\n // Do stuff\n\t\tcallback(null, {});\n }\n\n# API\n\nAll methods that *aren't* part of node's core assert API are simply assumed to\ntake an argument, and then a string 'name' that's not a message; `AssertionError`\nwill be thrown if the assertion fails with a message like:\n\n AssertionError: foo (string) is required\n\tat test (/home/mark/work/foo/foo.js:3:9)\n\tat Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)\n\tat Module._compile (module.js:446:26)\n\tat Object..js (module.js:464:10)\n\tat Module.load (module.js:353:31)\n\tat Function._load (module.js:311:12)\n\tat Array.0 (module.js:484:10)\n\tat EventEmitter._tickCallback (node.js:190:38)\n\nfrom:\n\n function test(foo) {\n\t assert.string(foo, 'foo');\n }\n\nThere you go. You can check that arrays are of a homogenous type with `Arrayof$Type`:\n\n function test(foo) {\n\t assert.arrayOfString(foo, 'foo');\n }\n\nYou can assert IFF an argument is not `undefined` (i.e., an optional arg):\n\n assert.optionalString(foo, 'foo');\n\nLastly, you can opt-out of assertion checking altogether by setting the\nenvironment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have\nlots of assertions, and don't want to pay `typeof ()` taxes to v8 in\nproduction.\n\nThe complete list of APIs is:\n\n* assert.bool\n* assert.buffer\n* assert.func\n* assert.number\n* assert.object\n* assert.string\n* assert.arrayOfBool\n* assert.arrayOfFunc\n* assert.arrayOfNumber\n* assert.arrayOfObject\n* assert.arrayOfString\n* assert.optionalBool\n* assert.optionalBuffer\n* assert.optionalFunc\n* assert.optionalNumber\n* assert.optionalObject\n* assert.optionalString\n* assert.optionalArrayOfBool\n* assert.optionalArrayOfFunc\n* assert.optionalArrayOfNumber\n* assert.optionalArrayOfObject\n* assert.optionalArrayOfString\n* assert.AssertionError\n* assert.fail\n* assert.ok\n* assert.equal\n* assert.notEqual\n* assert.deepEqual\n* assert.notDeepEqual\n* assert.strictEqual\n* assert.notStrictEqual\n* assert.throws\n* assert.doesNotThrow\n* assert.ifError\n\n# Installation\n\n npm install assert-plus\n\n## License\n\nThe MIT License (MIT)\nCopyright (c) 2012 Mark Cavage\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n## Bugs\n\nSee <https://github.com/mcavage/node-assert-plus/issues>.\n",
- "readmeFilename": "README.md",
- "_id": "assert-plus@0.1.2",
- "_shasum": "d93ffdbb67ac5507779be316a7d65146417beef8",
- "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz",
- "_from": "assert-plus@0.1.2",
+ "maintainers": [
+ {
+ "name": "mcavage",
+ "email": "mcavage@gmail.com"
+ }
+ ],
+ "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": {}
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore
new file mode 100644
index 0000000000..dc6d3b24dd
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/.npmignore
@@ -0,0 +1 @@
+tst/
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG
index 078c03ca6b..426da9ef00 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/CHANGELOG
@@ -4,7 +4,14 @@ in it. The commit message also has the corresponding github issue. i.e. CTYPE-42
would be issue 42. Each issue can be found at:
https://github.com/rmustacc/node-ctype/issues/%d.
-CTYPE v0.5.2
+v0.5.3
+CTYPE-50 Release 0.5.3
+Contributed by Nick Schonning:
+CTYPE-49 Add repository section to package.json
+Contributed by Jonathan Ong:
+CTYPE-48 Create .npmignore
+
+v0.5.2
CTYPE-46 Release 0.5.2
CTYPE-45 error in setEndian logic
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 5840d050c3..4e1d86768d 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
@@ -1,6 +1,6 @@
{
"name": "ctype",
- "version": "0.5.2",
+ "version": "0.5.3",
"description": "read and write binary structures and data types",
"homepage": "https://github.com/rmustacc/node-ctype",
"author": {
@@ -11,10 +11,14 @@
"node": ">= 0.4"
},
"main": "ctype.js",
- "_id": "ctype@0.5.2",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/rmustacc/node-ctype.git"
+ },
+ "_id": "ctype@0.5.3",
"dist": {
- "shasum": "fe8091d468a373a0b0c9ff8bbfb3425c00973a1d",
- "tarball": "http://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz"
+ "shasum": "82c18c2461f74114ef16c135224ad0b9144ca12f",
+ "tarball": "http://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz"
},
"_npmVersion": "1.1.59",
"_npmUser": {
@@ -28,9 +32,12 @@
}
],
"directories": {},
- "_shasum": "fe8091d468a373a0b0c9ff8bbfb3425c00973a1d",
- "_resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz",
- "_from": "ctype@0.5.2",
+ "_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": {}
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json
deleted file mode 100644
index 29d7bd8929..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/float.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{ "metadata":
- {
- "ctf2json_version": "1.0",
- "created_at": 1316563626,
- "derived_from": "/lib/libc.so",
- "ctf_version": 2,
- "requested_types": [ "float" ]
- },
-"data":
- [
- { "name": "float", "float": { "length": 4 } }
- ]
-}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json
deleted file mode 100644
index f9773a1434..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/int.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{ "metadata":
- {
- "ctf2json_version": "1.0",
- "created_at": 1316563631,
- "derived_from": "/lib/libc.so",
- "ctf_version": 2,
- "requested_types": [ "int" ]
- },
-"data":
- [
- { "name": "int", "integer": { "length": 4, "signed": true } }
- ]
-}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json
deleted file mode 100644
index e0ee5e0d0d..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/psinfo.json
+++ /dev/null
@@ -1,104 +0,0 @@
-{ "metadata":
- {
- "ctf2json_version": "1.0",
- "created_at": 1316563573,
- "derived_from": "/lib/libc.so",
- "ctf_version": 2,
- "requested_types": [ "psinfo_t" ]
- },
-"data":
- [
- { "name": "int", "integer": { "length": 4, "signed": true } },
- { "name": "char", "integer": { "length": 1, "signed": true } },
- { "name": "unsigned short", "integer": { "length": 2, "signed": false } },
- { "name": "long", "integer": { "length": 4, "signed": true } },
- { "name": "unsigned", "integer": { "length": 4, "signed": false } },
- { "name": "size_t", "typedef": "unsigned" },
- { "name": "unsigned long", "integer": { "length": 4, "signed": false } },
- { "name": "time_t", "typedef": "long" },
- { "name": "struct timespec", "struct": [
- { "name": "tv_sec", "type": "time_t" },
- { "name": "tv_nsec", "type": "long" }
- ] },
- { "name": "zoneid_t", "typedef": "long" },
- { "name": "taskid_t", "typedef": "long" },
- { "name": "dev_t", "typedef": "unsigned long" },
- { "name": "uid_t", "typedef": "unsigned" },
- { "name": "gid_t", "typedef": "unsigned" },
- { "name": "timestruc_t", "typedef": "struct timespec" },
- { "name": "short", "integer": { "length": 2, "signed": true } },
- { "name": "projid_t", "typedef": "long" },
- { "name": "ushort_t", "typedef": "unsigned short" },
- { "name": "poolid_t", "typedef": "long" },
- { "name": "uintptr_t", "typedef": "unsigned" },
- { "name": "id_t", "typedef": "long" },
- { "name": "pid_t", "typedef": "long" },
- { "name": "processorid_t", "typedef": "int" },
- { "name": "psetid_t", "typedef": "int" },
- { "name": "struct lwpsinfo", "struct": [
- { "name": "pr_flag", "type": "int" },
- { "name": "pr_lwpid", "type": "id_t" },
- { "name": "pr_addr", "type": "uintptr_t" },
- { "name": "pr_wchan", "type": "uintptr_t" },
- { "name": "pr_stype", "type": "char" },
- { "name": "pr_state", "type": "char" },
- { "name": "pr_sname", "type": "char" },
- { "name": "pr_nice", "type": "char" },
- { "name": "pr_syscall", "type": "short" },
- { "name": "pr_oldpri", "type": "char" },
- { "name": "pr_cpu", "type": "char" },
- { "name": "pr_pri", "type": "int" },
- { "name": "pr_pctcpu", "type": "ushort_t" },
- { "name": "pr_pad", "type": "ushort_t" },
- { "name": "pr_start", "type": "timestruc_t" },
- { "name": "pr_time", "type": "timestruc_t" },
- { "name": "pr_clname", "type": "char [8]" },
- { "name": "pr_name", "type": "char [16]" },
- { "name": "pr_onpro", "type": "processorid_t" },
- { "name": "pr_bindpro", "type": "processorid_t" },
- { "name": "pr_bindpset", "type": "psetid_t" },
- { "name": "pr_lgrp", "type": "int" },
- { "name": "pr_filler", "type": "int [4]" }
- ] },
- { "name": "lwpsinfo_t", "typedef": "struct lwpsinfo" },
- { "name": "struct psinfo", "struct": [
- { "name": "pr_flag", "type": "int" },
- { "name": "pr_nlwp", "type": "int" },
- { "name": "pr_pid", "type": "pid_t" },
- { "name": "pr_ppid", "type": "pid_t" },
- { "name": "pr_pgid", "type": "pid_t" },
- { "name": "pr_sid", "type": "pid_t" },
- { "name": "pr_uid", "type": "uid_t" },
- { "name": "pr_euid", "type": "uid_t" },
- { "name": "pr_gid", "type": "gid_t" },
- { "name": "pr_egid", "type": "gid_t" },
- { "name": "pr_addr", "type": "uintptr_t" },
- { "name": "pr_size", "type": "size_t" },
- { "name": "pr_rssize", "type": "size_t" },
- { "name": "pr_pad1", "type": "size_t" },
- { "name": "pr_ttydev", "type": "dev_t" },
- { "name": "pr_pctcpu", "type": "ushort_t" },
- { "name": "pr_pctmem", "type": "ushort_t" },
- { "name": "pr_start", "type": "timestruc_t" },
- { "name": "pr_time", "type": "timestruc_t" },
- { "name": "pr_ctime", "type": "timestruc_t" },
- { "name": "pr_fname", "type": "char [16]" },
- { "name": "pr_psargs", "type": "char [80]" },
- { "name": "pr_wstat", "type": "int" },
- { "name": "pr_argc", "type": "int" },
- { "name": "pr_argv", "type": "uintptr_t" },
- { "name": "pr_envp", "type": "uintptr_t" },
- { "name": "pr_dmodel", "type": "char" },
- { "name": "pr_pad2", "type": "char [3]" },
- { "name": "pr_taskid", "type": "taskid_t" },
- { "name": "pr_projid", "type": "projid_t" },
- { "name": "pr_nzomb", "type": "int" },
- { "name": "pr_poolid", "type": "poolid_t" },
- { "name": "pr_zoneid", "type": "zoneid_t" },
- { "name": "pr_contract", "type": "id_t" },
- { "name": "pr_filler", "type": "int [1]" },
- { "name": "pr_lwp", "type": "lwpsinfo_t" }
- ] },
- { "name": "psinfo_t", "typedef": "struct psinfo" }
- ]
-}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json
deleted file mode 100644
index e0542ff403..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/struct.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{ "metadata":
- {
- "ctf2json_version": "1.0",
- "created_at": 1316563648,
- "derived_from": "/lib/libc.so",
- "ctf_version": 2,
- "requested_types": [ "timestruc_t" ]
- },
-"data":
- [
- { "name": "long", "integer": { "length": 4, "signed": true } },
- { "name": "time_t", "typedef": "long" },
- { "name": "struct timespec", "struct": [
- { "name": "tv_sec", "type": "time_t" },
- { "name": "tv_nsec", "type": "long" }
- ] },
- { "name": "timestruc_t", "typedef": "struct timespec" }
- ]
-}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js
deleted file mode 100644
index d6a52cbb16..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.fail.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Test several conditions that should always cause us to throw.
- */
-var mod_assert = require('assert');
-var mod_ctype = require('../../ctype.js');
-
-var cases = [
-{ json: { }, msg: 'bad JSON - no metadata or data' },
-{ json: { metadata: {} }, msg: 'bad JSON - bad metadata section' },
-{ json: { metadata: { 'JSON version': [] } },
- msg: 'bad JSON - bad JSON version' },
-{ json: { metadata: { 'JSON version': 2 } },
- msg: 'bad JSON - bad JSON version' },
-{ json: { metadata: { 'JSON version': '100.20' } },
- msg: 'bad JSON - bad JSON version' },
-{ json: { metadata: { 'JSON version': '1.0' } },
- msg: 'missing data section' },
-{ json: { metadata: { 'JSON version': '1.0' }, data: 1 },
- msg: 'invalid data section' },
-{ json: { metadata: { 'JSON version': '1.0' }, data: 1.1 },
- msg: 'invalid data section' },
-{ json: { metadata: { 'JSON version': '1.0' }, data: '1.1' },
- msg: 'invalid data section' },
-{ json: { metadata: { 'JSON version': '1.0' }, data: {} },
- msg: 'invalid data section' }
-];
-
-function test()
-{
- var ii;
-
- for (ii = 0; ii < cases.length; ii++) {
- mod_assert.throws(function () {
- mod_ctype.parseCTF(cases[ii].json);
- }, Error, cases[ii].msg);
- }
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js
deleted file mode 100644
index f2144994a7..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.float.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var mod_fs = require('fs');
-var mod_ctype = require('../../ctype.js');
-var mod_assert = require('assert');
-
-function test()
-{
- var data, parser;
-
- data = JSON.parse(mod_fs.readFileSync('./float.json').toString());
- parser = mod_ctype.parseCTF(data, { endian: 'big' });
- mod_assert.deepEqual(parser.lstypes(), {});
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js
deleted file mode 100644
index 0ec0f76948..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.int.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var mod_fs = require('fs');
-var mod_ctype = require('../../ctype.js');
-var mod_assert = require('assert');
-
-function test()
-{
- var data, parser;
-
- data = JSON.parse(mod_fs.readFileSync('./int.json').toString());
- parser = mod_ctype.parseCTF(data, { endian: 'big' });
- mod_assert.deepEqual(parser.lstypes(), { 'int': 'int32_t' });
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js
deleted file mode 100644
index ca1a544c22..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.psinfo.js
+++ /dev/null
@@ -1,17 +0,0 @@
-var mod_fs = require('fs');
-var mod_ctype = require('../../ctype.js');
-var mod_assert = require('assert');
-
-/*
- * This is too unwieldly to actually write out. Just make sure we can parse it
- * without errrors.
- */
-function test()
-{
- var data;
-
- data = JSON.parse(mod_fs.readFileSync('./psinfo.json').toString());
- mod_ctype.parseCTF(data, { endian: 'big' });
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js
deleted file mode 100644
index c62f41f9a2..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.struct.js
+++ /dev/null
@@ -1,18 +0,0 @@
-var mod_fs = require('fs');
-var mod_ctype = require('../../ctype.js');
-var mod_assert = require('assert');
-
-function test()
-{
- var data, parser;
-
- data = JSON.parse(mod_fs.readFileSync('./struct.json').toString());
- parser = mod_ctype.parseCTF(data, { endian: 'big' });
- mod_assert.deepEqual(parser.lstypes(), { 'long': 'int32_t',
- 'time_t': 'long',
- 'timestruc_t': 'struct timespec',
- 'struct timespec': [ { 'tv_sec': { 'type': 'time_t' } },
- { 'tv_nsec': { 'type': 'long' } } ] });
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js
deleted file mode 100644
index 9006cd1b9b..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/tst.typedef.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var mod_fs = require('fs');
-var mod_ctype = require('../../ctype.js');
-var mod_assert = require('assert');
-
-function test()
-{
- var data, parser;
-
- data = JSON.parse(mod_fs.readFileSync('./typedef.json').toString());
- parser = mod_ctype.parseCTF(data, { endian: 'big' });
- mod_assert.deepEqual(parser.lstypes(), { 'bar_t': 'int',
- 'int': 'int32_t' });
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json
deleted file mode 100644
index 35ddb50d70..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctf/typedef.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{ "metadata":
- {
- "ctf2json_version": "1.0",
- "created_at": 1316302348,
- "derived_from": "/lib/libc.so",
- "ctf_version": 2,
- "requested_types": [ "bar_t" ]
- },
-"data":
- [
- { "name": "int", "integer": { "length": 4, "signed": true } },
- { "name": "bar_t", "typedef": "int" }
- ]
-}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js
deleted file mode 100644
index 2c9504a8e5..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.rfloat.js
+++ /dev/null
@@ -1,767 +0,0 @@
-/*
- * Battery of tests to break our floating point implementation. Oh ho ho.
- *
- * There are a few useful ways to generate the expected output. The first is
- * just write a C program and write raw bytes out and inspect with xxd. Remember
- * to consider whether or not you're on a big endian or little endian machine.
- * Another useful site I found to help with some of this was:
- *
- * http://babbage.cs.qc.edu/IEEE-754/
- */
-
-var mod_ctype = require('../../../ctio.js');
-var ASSERT = require('assert');
-
-function testfloat()
-{
- var buffer = new Buffer(4);
- /* Start off with some of the easy ones: +zero */
- buffer[0] = 0;
- buffer[1] = 0;
- buffer[2] = 0;
- buffer[3] = 0;
-
- ASSERT.equal(0, mod_ctype.rfloat(buffer, 'big', 0));
- ASSERT.equal(0, mod_ctype.rfloat(buffer, 'little', 0));
-
- /* Test -0 */
- buffer[0] = 0x80;
- ASSERT.equal(0, mod_ctype.rfloat(buffer, 'big', 0));
- buffer[3] = buffer[0];
- buffer[0] = 0;
- ASSERT.equal(0, mod_ctype.rfloat(buffer, 'little', 0));
-
- /* Catch +infin */
- buffer[0] = 0x7f;
- buffer[1] = 0x80;
- buffer[2] = 0x00;
- buffer[3] = 0x00;
- ASSERT.equal(Number.POSITIVE_INFINITY,
- mod_ctype.rfloat(buffer, 'big', 0));
- buffer[3] = 0x7f;
- buffer[2] = 0x80;
- buffer[1] = 0x00;
- buffer[0] = 0x00;
- ASSERT.equal(Number.POSITIVE_INFINITY,
- mod_ctype.rfloat(buffer, 'litle', 0));
-
- /* Catch -infin */
- buffer[0] = 0xff;
- buffer[1] = 0x80;
- buffer[2] = 0x00;
- buffer[3] = 0x00;
- ASSERT.equal(Number.NEGATIVE_INFINITY,
- mod_ctype.rfloat(buffer, 'big', 0));
- buffer[3] = 0xff;
- buffer[2] = 0x80;
- buffer[1] = 0x00;
- buffer[0] = 0x00;
- ASSERT.equal(Number.NEGATIVE_INFINITY,
- mod_ctype.rfloat(buffer, 'litle', 0));
-
- /* Catch NaN */
-
- buffer[0] = 0x7f;
- buffer[1] = 0x80;
- buffer[2] = 0x00;
- buffer[3] = 0x23;
- ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'big', 0)));
- buffer[3] = 0x7f;
- buffer[2] = 0x80;
- buffer[1] = 0x00;
- buffer[0] = 0x23;
- ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'little', 0)));
-
- /* Catch -infin */
- buffer[0] = 0xff;
- buffer[1] = 0x80;
- buffer[2] = 0x00;
- buffer[3] = 0x23;
- ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'big', 0)));
- buffer[3] = 0xff;
- buffer[2] = 0x80;
- buffer[1] = 0x00;
- buffer[0] = 0x23;
- ASSERT.ok(isNaN(mod_ctype.rfloat(buffer, 'little', 0)));
-
- /* On to some basic tests */
- /* 1.125 */
- buffer[0] = 0x3f;
- buffer[1] = 0x90;
- buffer[2] = 0x00;
- buffer[3] = 0x00;
- ASSERT.equal(1.125, mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0x3f;
- buffer[2] = 0x90;
- buffer[1] = 0x00;
- buffer[0] = 0x00;
- ASSERT.equal(1.125, mod_ctype.rfloat(buffer, 'little', 0));
-
- /* ff34a2b0 -2.4010576103645774e+38 */
- buffer[0] = 0xff;
- buffer[1] = 0x34;
- buffer[2] = 0xa2;
- buffer[3] = 0xb0;
- ASSERT.equal(-2.4010576103645774e+38,
- mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0xff;
- buffer[2] = 0x34;
- buffer[1] = 0xa2;
- buffer[0] = 0xb0;
- ASSERT.equal(-2.4010576103645774e+38,
- mod_ctype.rfloat(buffer, 'little', 0));
-
- /* Denormalized tests */
-
- /* 0003f89a +/- 3.6468792534053364e-40 */
- buffer[0] = 0x00;
- buffer[1] = 0x03;
- buffer[2] = 0xf8;
- buffer[3] = 0x9a;
- ASSERT.equal(3.6468792534053364e-40,
- mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0x00;
- buffer[2] = 0x03;
- buffer[1] = 0xf8;
- buffer[0] = 0x9a;
- ASSERT.equal(3.6468792534053364e-40,
- mod_ctype.rfloat(buffer, 'little', 0));
-
- buffer[0] = 0x80;
- buffer[1] = 0x03;
- buffer[2] = 0xf8;
- buffer[3] = 0x9a;
- ASSERT.equal(-3.6468792534053364e-40,
- mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0x80;
- buffer[2] = 0x03;
- buffer[1] = 0xf8;
- buffer[0] = 0x9a;
- ASSERT.equal(-3.6468792534053364e-40,
- mod_ctype.rfloat(buffer, 'little', 0));
-
-
- /* Maximum and minimum normalized and denormalized values */
-
- /* Largest normalized number +/- 3.4028234663852886e+38 */
-
- buffer[0] = 0x7f;
- buffer[1] = 0x7f;
- buffer[2] = 0xff;
- buffer[3] = 0xff;
- ASSERT.equal(3.4028234663852886e+38,
- mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0x7f;
- buffer[2] = 0x7f;
- buffer[1] = 0xff;
- buffer[0] = 0xff;
- ASSERT.equal(3.4028234663852886e+38,
- mod_ctype.rfloat(buffer, 'little', 0));
-
- buffer[0] = 0xff;
- buffer[1] = 0x7f;
- buffer[2] = 0xff;
- buffer[3] = 0xff;
- ASSERT.equal(-3.4028234663852886e+38,
- mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0xff;
- buffer[2] = 0x7f;
- buffer[1] = 0xff;
- buffer[0] = 0xff;
- ASSERT.equal(-3.4028234663852886e+38,
- mod_ctype.rfloat(buffer, 'little', 0));
-
- /* Smallest normalied number +/- 1.1754943508222875e-38 */
- buffer[0] = 0x00;
- buffer[1] = 0x80;
- buffer[2] = 0x00;
- buffer[3] = 0x00;
- ASSERT.equal(1.1754943508222875e-38,
- mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0x00;
- buffer[2] = 0x80;
- buffer[1] = 0x00;
- buffer[0] = 0x00;
- ASSERT.equal(1.1754943508222875e-38,
- mod_ctype.rfloat(buffer, 'little', 0));
-
- buffer[0] = 0x80;
- buffer[1] = 0x80;
- buffer[2] = 0x00;
- buffer[3] = 0x00;
- ASSERT.equal(-1.1754943508222875e-38,
- mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0x80;
- buffer[2] = 0x80;
- buffer[1] = 0x00;
- buffer[0] = 0x00;
- ASSERT.equal(-1.1754943508222875e-38,
- mod_ctype.rfloat(buffer, 'little', 0));
-
-
- /* Smallest denormalized number 1.401298464324817e-45 */
- buffer[0] = 0x00;
- buffer[1] = 0x00;
- buffer[2] = 0x00;
- buffer[3] = 0x01;
- ASSERT.equal(1.401298464324817e-45,
- mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0x00;
- buffer[2] = 0x00;
- buffer[1] = 0x00;
- buffer[0] = 0x01;
- ASSERT.equal(1.401298464324817e-45,
- mod_ctype.rfloat(buffer, 'little', 0));
-
- buffer[0] = 0x80;
- buffer[1] = 0x00;
- buffer[2] = 0x00;
- buffer[3] = 0x01;
- ASSERT.equal(-1.401298464324817e-45,
- mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0x80;
- buffer[2] = 0x00;
- buffer[1] = 0x00;
- buffer[0] = 0x01;
- ASSERT.equal(-1.401298464324817e-45,
- mod_ctype.rfloat(buffer, 'little', 0));
-
- /* Largest denormalized value +/- 1.1754942106924411e-38 */
- buffer[0] = 0x00;
- buffer[1] = 0x7f;
- buffer[2] = 0xff;
- buffer[3] = 0xff;
- ASSERT.equal(1.1754942106924411e-38,
- mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0x00;
- buffer[2] = 0x7f;
- buffer[1] = 0xff;
- buffer[0] = 0xff;
- ASSERT.equal(1.1754942106924411e-38,
- mod_ctype.rfloat(buffer, 'little', 0));
-
- buffer[0] = 0x80;
- buffer[1] = 0x7f;
- buffer[2] = 0xff;
- buffer[3] = 0xff;
- ASSERT.equal(-1.1754942106924411e-38,
- mod_ctype.rfloat(buffer, 'big', 0));
-
- buffer[3] = 0x80;
- buffer[2] = 0x7f;
- buffer[1] = 0xff;
- buffer[0] = 0xff;
- ASSERT.equal(-1.1754942106924411e-38,
- mod_ctype.rfloat(buffer, 'little', 0));
-
- /* Do some quick offset testing */
- buffer = new Buffer(6);
- buffer[0] = 0x7f;
- buffer[1] = 0x4e;
- buffer[2] = 0x8a;
- buffer[3] = 0x79;
- buffer[4] = 0xcd;
- buffer[5] = 0x3f;
-
- ASSERT.equal(2.745399582697325e+38,
- mod_ctype.rfloat(buffer, 'big', 0));
- ASSERT.equal(1161619072,
- mod_ctype.rfloat(buffer, 'big', 1));
- ASSERT.equal(-1.2027516403607578e-32,
- mod_ctype.rfloat(buffer, 'big', 2));
-
- ASSERT.equal(8.97661320504413e+34,
- mod_ctype.rfloat(buffer, 'little', 0));
- ASSERT.equal(-261661920,
- mod_ctype.rfloat(buffer, 'little', 1));
- ASSERT.equal(1.605271577835083,
- mod_ctype.rfloat(buffer, 'little', 2));
-
-}
-
-function testdouble()
-{
- var buffer = new Buffer(10);
-
- /* Check 0 */
- buffer[0] = 0;
- buffer[1] = 0;
- buffer[2] = 0;
- buffer[3] = 0;
- buffer[4] = 0;
- buffer[5] = 0;
- buffer[6] = 0;
- buffer[7] = 0;
- ASSERT.equal(0,
- mod_ctype.rdouble(buffer, 'big', 0));
- ASSERT.equal(0,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- buffer[0] = 0x80;
- buffer[1] = 0;
- buffer[2] = 0;
- buffer[3] = 0;
- buffer[4] = 0;
- buffer[5] = 0;
- buffer[6] = 0;
- buffer[7] = 0;
- ASSERT.equal(0,
- mod_ctype.rdouble(buffer, 'big', 0));
- buffer[7] = 0x80;
- buffer[6] = 0;
- buffer[5] = 0;
- buffer[4] = 0;
- buffer[3] = 0;
- buffer[2] = 0;
- buffer[1] = 0;
- buffer[0] = 0;
- ASSERT.equal(0,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- /* Check NaN */
- buffer[0] = 0x7f;
- buffer[1] = 0xf0;
- buffer[2] = 0;
- buffer[3] = 0;
- buffer[4] = 0;
- buffer[5] = 0;
- buffer[6] = 0;
- buffer[7] = 23;
- ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'big', 0)));
-
- buffer[7] = 0x7f;
- buffer[6] = 0xf0;
- buffer[5] = 0;
- buffer[4] = 0;
- buffer[3] = 0;
- buffer[2] = 0;
- buffer[1] = 0;
- buffer[0] = 23;
- ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'little', 0)));
-
- buffer[0] = 0xff;
- buffer[1] = 0xf0;
- buffer[2] = 0;
- buffer[3] = 0;
- buffer[4] = 0;
- buffer[5] = 0;
- buffer[6] = 0;
- buffer[7] = 23;
- ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'big', 0)));
-
- buffer[7] = 0xff;
- buffer[6] = 0xf0;
- buffer[5] = 0;
- buffer[4] = 0;
- buffer[3] = 0;
- buffer[2] = 0;
- buffer[1] = 0;
- buffer[0] = 23;
- ASSERT.ok(isNaN(mod_ctype.rdouble(buffer, 'little', 0)));
-
- /* pos inf */
- buffer[0] = 0x7f;
- buffer[1] = 0xf0;
- buffer[2] = 0;
- buffer[3] = 0;
- buffer[4] = 0;
- buffer[5] = 0;
- buffer[6] = 0;
- buffer[7] = 0;
- ASSERT.equal(Number.POSITIVE_INFINITY,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x7f;
- buffer[6] = 0xf0;
- buffer[5] = 0;
- buffer[4] = 0;
- buffer[3] = 0;
- buffer[2] = 0;
- buffer[1] = 0;
- buffer[0] = 0;
- ASSERT.equal(Number.POSITIVE_INFINITY,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- /* neg inf */
- buffer[0] = 0xff;
- buffer[1] = 0xf0;
- buffer[2] = 0;
- buffer[3] = 0;
- buffer[4] = 0;
- buffer[5] = 0;
- buffer[6] = 0;
- buffer[7] = 0;
- ASSERT.equal(Number.NEGATIVE_INFINITY,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0xff;
- buffer[6] = 0xf0;
- buffer[5] = 0;
- buffer[4] = 0;
- buffer[3] = 0;
- buffer[2] = 0;
- buffer[1] = 0;
- buffer[0] = 0;
- ASSERT.equal(Number.NEGATIVE_INFINITY,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- /* Simple normalized values */
-
- /* +/- 1.125 */
- buffer[0] = 0x3f;
- buffer[1] = 0xf2;
- buffer[2] = 0;
- buffer[3] = 0;
- buffer[4] = 0;
- buffer[5] = 0;
- buffer[6] = 0;
- buffer[7] = 0;
- ASSERT.equal(1.125,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x3f;
- buffer[6] = 0xf2;
- buffer[5] = 0;
- buffer[4] = 0;
- buffer[3] = 0;
- buffer[2] = 0;
- buffer[1] = 0;
- buffer[0] = 0;
- ASSERT.equal(1.125,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- buffer[0] = 0xbf;
- buffer[1] = 0xf2;
- buffer[2] = 0;
- buffer[3] = 0;
- buffer[4] = 0;
- buffer[5] = 0;
- buffer[6] = 0;
- buffer[7] = 0;
- ASSERT.equal(-1.125,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0xbf;
- buffer[6] = 0xf2;
- buffer[5] = 0;
- buffer[4] = 0;
- buffer[3] = 0;
- buffer[2] = 0;
- buffer[1] = 0;
- buffer[0] = 0;
- ASSERT.equal(-1.125,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- /* +/- 1.4397318913736026e+283 */
- buffer[0] = 0x7a;
- buffer[1] = 0xb8;
- buffer[2] = 0xc9;
- buffer[3] = 0x34;
- buffer[4] = 0x72;
- buffer[5] = 0x16;
- buffer[6] = 0xf9;
- buffer[7] = 0x0e;
- ASSERT.equal(1.4397318913736026e+283,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x7a;
- buffer[6] = 0xb8;
- buffer[5] = 0xc9;
- buffer[4] = 0x34;
- buffer[3] = 0x72;
- buffer[2] = 0x16;
- buffer[1] = 0xf9;
- buffer[0] = 0x0e;
- ASSERT.equal(1.4397318913736026e+283,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- buffer[0] = 0xfa;
- buffer[1] = 0xb8;
- buffer[2] = 0xc9;
- buffer[3] = 0x34;
- buffer[4] = 0x72;
- buffer[5] = 0x16;
- buffer[6] = 0xf9;
- buffer[7] = 0x0e;
- ASSERT.equal(-1.4397318913736026e+283,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0xfa;
- buffer[6] = 0xb8;
- buffer[5] = 0xc9;
- buffer[4] = 0x34;
- buffer[3] = 0x72;
- buffer[2] = 0x16;
- buffer[1] = 0xf9;
- buffer[0] = 0x0e;
- ASSERT.equal(-1.4397318913736026e+283,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- /* Denormalized values */
- /* +/- 8.82521232268344e-309 */
- buffer[0] = 0x00;
- buffer[1] = 0x06;
- buffer[2] = 0x58;
- buffer[3] = 0x94;
- buffer[4] = 0x13;
- buffer[5] = 0x27;
- buffer[6] = 0x8a;
- buffer[7] = 0xcd;
- ASSERT.equal(8.82521232268344e-309,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x00;
- buffer[6] = 0x06;
- buffer[5] = 0x58;
- buffer[4] = 0x94;
- buffer[3] = 0x13;
- buffer[2] = 0x27;
- buffer[1] = 0x8a;
- buffer[0] = 0xcd;
- ASSERT.equal(8.82521232268344e-309,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- buffer[0] = 0x80;
- buffer[1] = 0x06;
- buffer[2] = 0x58;
- buffer[3] = 0x94;
- buffer[4] = 0x13;
- buffer[5] = 0x27;
- buffer[6] = 0x8a;
- buffer[7] = 0xcd;
- ASSERT.equal(-8.82521232268344e-309,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x80;
- buffer[6] = 0x06;
- buffer[5] = 0x58;
- buffer[4] = 0x94;
- buffer[3] = 0x13;
- buffer[2] = 0x27;
- buffer[1] = 0x8a;
- buffer[0] = 0xcd;
- ASSERT.equal(-8.82521232268344e-309,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- /* Edge cases, maximum and minimum values */
-
- /* Smallest denormalized value 5e-324 */
- buffer[0] = 0x00;
- buffer[1] = 0x00;
- buffer[2] = 0x00;
- buffer[3] = 0x00;
- buffer[4] = 0x00;
- buffer[5] = 0x00;
- buffer[6] = 0x00;
- buffer[7] = 0x01;
- ASSERT.equal(5e-324,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x00;
- buffer[6] = 0x00;
- buffer[5] = 0x00;
- buffer[4] = 0x00;
- buffer[3] = 0x00;
- buffer[2] = 0x00;
- buffer[1] = 0x00;
- buffer[0] = 0x01;
- ASSERT.equal(5e-324,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- buffer[0] = 0x80;
- buffer[1] = 0x00;
- buffer[2] = 0x00;
- buffer[3] = 0x00;
- buffer[4] = 0x00;
- buffer[5] = 0x00;
- buffer[6] = 0x00;
- buffer[7] = 0x01;
- ASSERT.equal(-5e-324,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x80;
- buffer[6] = 0x00;
- buffer[5] = 0x00;
- buffer[4] = 0x00;
- buffer[3] = 0x00;
- buffer[2] = 0x00;
- buffer[1] = 0x00;
- buffer[0] = 0x01;
- ASSERT.equal(-5e-324,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- /* Largest denormalized value 2.225073858507201e-308 */
- buffer[0] = 0x00;
- buffer[1] = 0x0f;
- buffer[2] = 0xff;
- buffer[3] = 0xff;
- buffer[4] = 0xff;
- buffer[5] = 0xff;
- buffer[6] = 0xff;
- buffer[7] = 0xff;
- ASSERT.equal(2.225073858507201e-308,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x00;
- buffer[6] = 0x0f;
- buffer[5] = 0xff;
- buffer[4] = 0xff;
- buffer[3] = 0xff;
- buffer[2] = 0xff;
- buffer[1] = 0xff;
- buffer[0] = 0xff;
- ASSERT.equal(2.225073858507201e-308,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- buffer[0] = 0x80;
- buffer[1] = 0x0f;
- buffer[2] = 0xff;
- buffer[3] = 0xff;
- buffer[4] = 0xff;
- buffer[5] = 0xff;
- buffer[6] = 0xff;
- buffer[7] = 0xff;
- ASSERT.equal(-2.225073858507201e-308,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x80;
- buffer[6] = 0x0f;
- buffer[5] = 0xff;
- buffer[4] = 0xff;
- buffer[3] = 0xff;
- buffer[2] = 0xff;
- buffer[1] = 0xff;
- buffer[0] = 0xff;
- ASSERT.equal(-2.225073858507201e-308,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- /* Smallest normalized value 2.2250738585072014e-308 */
- buffer[0] = 0x00;
- buffer[1] = 0x10;
- buffer[2] = 0x00;
- buffer[3] = 0x00;
- buffer[4] = 0x00;
- buffer[5] = 0x00;
- buffer[6] = 0x00;
- buffer[7] = 0x00;
- ASSERT.equal(2.2250738585072014e-308,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x00;
- buffer[6] = 0x10;
- buffer[5] = 0x00;
- buffer[4] = 0x00;
- buffer[3] = 0x00;
- buffer[2] = 0x00;
- buffer[1] = 0x00;
- buffer[0] = 0x00;
- ASSERT.equal(2.2250738585072014e-308,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- buffer[0] = 0x80;
- buffer[1] = 0x10;
- buffer[2] = 0x00;
- buffer[3] = 0x00;
- buffer[4] = 0x00;
- buffer[5] = 0x00;
- buffer[6] = 0x00;
- buffer[7] = 0x00;
- ASSERT.equal(-2.2250738585072014e-308,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x80;
- buffer[6] = 0x10;
- buffer[5] = 0x00;
- buffer[4] = 0x00;
- buffer[3] = 0x00;
- buffer[2] = 0x00;
- buffer[1] = 0x00;
- buffer[0] = 0x00;
- ASSERT.equal(-2.2250738585072014e-308,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- /* Largest normalized value 1.7976931348623157e+308 */
- buffer[0] = 0x7f;
- buffer[1] = 0xef;
- buffer[2] = 0xff;
- buffer[3] = 0xff;
- buffer[4] = 0xff;
- buffer[5] = 0xff;
- buffer[6] = 0xff;
- buffer[7] = 0xff;
- ASSERT.equal(1.7976931348623157e+308,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0x7f;
- buffer[6] = 0xef;
- buffer[5] = 0xff;
- buffer[4] = 0xff;
- buffer[3] = 0xff;
- buffer[2] = 0xff;
- buffer[1] = 0xff;
- buffer[0] = 0xff;
- ASSERT.equal(1.7976931348623157e+308,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- buffer[0] = 0xff;
- buffer[1] = 0xef;
- buffer[2] = 0xff;
- buffer[3] = 0xff;
- buffer[4] = 0xff;
- buffer[5] = 0xff;
- buffer[6] = 0xff;
- buffer[7] = 0xff;
- ASSERT.equal(-1.7976931348623157e+308,
- mod_ctype.rdouble(buffer, 'big', 0));
-
- buffer[7] = 0xff;
- buffer[6] = 0xef;
- buffer[5] = 0xff;
- buffer[4] = 0xff;
- buffer[3] = 0xff;
- buffer[2] = 0xff;
- buffer[1] = 0xff;
- buffer[0] = 0xff;
- ASSERT.equal(-1.7976931348623157e+308,
- mod_ctype.rdouble(buffer, 'little', 0));
-
- /* Try offsets */
- buffer[0] = 0xde;
- buffer[1] = 0xad;
- buffer[2] = 0xbe;
- buffer[3] = 0xef;
- buffer[4] = 0xba;
- buffer[5] = 0xdd;
- buffer[6] = 0xca;
- buffer[7] = 0xfe;
- buffer[8] = 0x16;
- buffer[9] = 0x79;
-
- ASSERT.equal(-1.1885958404126936e+148,
- mod_ctype.rdouble(buffer, 'big', 0));
- ASSERT.equal(-2.4299184080448593e-88,
- mod_ctype.rdouble(buffer, 'big', 1));
- ASSERT.equal(-0.000015130017658081283,
- mod_ctype.rdouble(buffer, 'big', 2));
-
- ASSERT.equal(-5.757458694845505e+302,
- mod_ctype.rdouble(buffer, 'little', 0));
- ASSERT.equal(6.436459604192476e-198,
- mod_ctype.rdouble(buffer, 'little', 1));
- ASSERT.equal(1.9903745632417286e+275,
- mod_ctype.rdouble(buffer, 'little', 2));
-}
-
-testfloat();
-testdouble();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js
deleted file mode 100644
index b5fd95cdf8..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/float/tst.wfloat.js
+++ /dev/null
@@ -1,753 +0,0 @@
-/*
- * Another place to find bugs that may yet plague us. This time with writing out
- * floats to arrays. We are lazy and did basically just take the opposite of our
- * test code to read in values.
- */
-
-var mod_ctype = require('../../../ctio.js');
-var ASSERT = require('assert');
-
-
-/*
- * A useful thing to keep around for debugging
- * console.log('buffer[0]: ' + buffer[0].toString(16));
- * console.log('buffer[1]: ' + buffer[1].toString(16));
- * console.log('buffer[2]: ' + buffer[2].toString(16));
- * console.log('buffer[3]: ' + buffer[3].toString(16));
- * console.log('buffer[4]: ' + buffer[4].toString(16));
- * console.log('buffer[5]: ' + buffer[5].toString(16));
- * console.log('buffer[6]: ' + buffer[6].toString(16));
- * console.log('buffer[7]: ' + buffer[7].toString(16));
- */
-
-function testfloat()
-{
- var buffer = new Buffer(4);
- mod_ctype.wfloat(0, 'big', buffer, 0);
- /* Start off with some of the easy ones: +zero */
- ASSERT.equal(0, buffer[0]);
- ASSERT.equal(0, buffer[1]);
- ASSERT.equal(0, buffer[2]);
- ASSERT.equal(0, buffer[3]);
- mod_ctype.wfloat(0, 'little', buffer, 0);
- ASSERT.equal(0, buffer[0]);
- ASSERT.equal(0, buffer[1]);
- ASSERT.equal(0, buffer[2]);
- ASSERT.equal(0, buffer[3]);
-
- /* Catch +infin */
- mod_ctype.wfloat(Number.POSITIVE_INFINITY, 'big', buffer, 0);
- ASSERT.equal(0x7f, buffer[0]);
- ASSERT.equal(0x80, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- mod_ctype.wfloat(Number.POSITIVE_INFINITY, 'little', buffer, 0);
- ASSERT.equal(0x7f, buffer[3]);
- ASSERT.equal(0x80, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
- /* Catch -infin */
- mod_ctype.wfloat(Number.NEGATIVE_INFINITY, 'big', buffer, 0);
- ASSERT.equal(0xff, buffer[0]);
- ASSERT.equal(0x80, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- mod_ctype.wfloat(Number.NEGATIVE_INFINITY, 'little', buffer, 0);
- ASSERT.equal(0xff, buffer[3]);
- ASSERT.equal(0x80, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
- /* Catch NaN */
-
- /*
- * NaN Is a litle weird in its requirements, so we're going to encode a
- * bit of how we actually implement it into this test. Probably not the
- * best, since technically the sign is a don't care and the mantissa
- * needs to just be non-zero.
- */
- mod_ctype.wfloat(NaN, 'big', buffer, 0);
- ASSERT.equal(0x7f, buffer[0]);
- ASSERT.equal(0x80, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x17, buffer[3]);
- mod_ctype.wfloat(NaN, 'little', buffer, 0);
- ASSERT.equal(0x7f, buffer[3]);
- ASSERT.equal(0x80, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x17, buffer[0]);
-
- /* On to some basic tests */
- /* 1.125 */
- mod_ctype.wfloat(1.125, 'big', buffer, 0);
- ASSERT.equal(0x3f, buffer[0]);
- ASSERT.equal(0x90, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- mod_ctype.wfloat(1.125, 'little', buffer, 0);
- ASSERT.equal(0x3f, buffer[3]);
- ASSERT.equal(0x90, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
- mod_ctype.wfloat(1.0000001192092896, 'big', buffer, 0);
- ASSERT.equal(0x3f, buffer[0]);
- ASSERT.equal(0x80, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x01, buffer[3]);
- mod_ctype.wfloat(1.0000001192092896, 'little', buffer, 0);
- ASSERT.equal(0x3f, buffer[3]);
- ASSERT.equal(0x80, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x01, buffer[0]);
-
- mod_ctype.wfloat(1.0000001192092896, 'big', buffer, 0);
- ASSERT.equal(0x3f, buffer[0]);
- ASSERT.equal(0x80, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x01, buffer[3]);
- mod_ctype.wfloat(1.0000001192092896, 'little', buffer, 0);
- ASSERT.equal(0x3f, buffer[3]);
- ASSERT.equal(0x80, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x01, buffer[0]);
-
- mod_ctype.wfloat(2.3283067140944524e-10, 'big', buffer, 0);
- ASSERT.equal(0x2f, buffer[0]);
- ASSERT.equal(0x80, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x01, buffer[3]);
- mod_ctype.wfloat(2.3283067140944524e-10, 'little', buffer, 0);
- ASSERT.equal(0x2f, buffer[3]);
- ASSERT.equal(0x80, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x01, buffer[0]);
-
- /* ff34a2b0 -2.4010576103645774e+38 */
- mod_ctype.wfloat(-2.4010576103645774e+38,
- 'big', buffer, 0);
- ASSERT.equal(0xff, buffer[0]);
- ASSERT.equal(0x34, buffer[1]);
- ASSERT.equal(0xa2, buffer[2]);
- ASSERT.equal(0xb0, buffer[3]);
- mod_ctype.wfloat(-2.4010576103645774e+38,
- 'little', buffer, 0);
- ASSERT.equal(0xff, buffer[3]);
- ASSERT.equal(0x34, buffer[2]);
- ASSERT.equal(0xa2, buffer[1]);
- ASSERT.equal(0xb0, buffer[0]);
-
- /* Denormalized tests */
-
- /* 0003f89a +/- 3.6468792534053364e-40 */
- mod_ctype.wfloat(3.6468792534053364e-40,
- 'big', buffer, 0);
- ASSERT.equal(0x00, buffer[0]);
- ASSERT.equal(0x03, buffer[1]);
- ASSERT.equal(0xf8, buffer[2]);
- ASSERT.equal(0x9a, buffer[3]);
- mod_ctype.wfloat(3.6468792534053364e-40,
- 'little', buffer, 0);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x03, buffer[2]);
- ASSERT.equal(0xf8, buffer[1]);
- ASSERT.equal(0x9a, buffer[0]);
-
- mod_ctype.wfloat(-3.6468792534053364e-40,
- 'big', buffer, 0);
- ASSERT.equal(0x80, buffer[0]);
- ASSERT.equal(0x03, buffer[1]);
- ASSERT.equal(0xf8, buffer[2]);
- ASSERT.equal(0x9a, buffer[3]);
- mod_ctype.wfloat(-3.6468792534053364e-40,
- 'little', buffer, 0);
- ASSERT.equal(0x80, buffer[3]);
- ASSERT.equal(0x03, buffer[2]);
- ASSERT.equal(0xf8, buffer[1]);
- ASSERT.equal(0x9a, buffer[0]);
-
- /* Maximum and minimum normalized and denormalized values */
-
- /* Largest normalized number +/- 3.4028234663852886e+38 */
-
- mod_ctype.wfloat(3.4028234663852886e+38,
- 'big', buffer, 0);
- ASSERT.equal(0x7f, buffer[0]);
- ASSERT.equal(0x7f, buffer[1]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[3]);
- mod_ctype.wfloat(3.4028234663852886e+38,
- 'little', buffer, 0);
- ASSERT.equal(0x7f, buffer[3]);
- ASSERT.equal(0x7f, buffer[2]);
- ASSERT.equal(0xff, buffer[1]);
- ASSERT.equal(0xff, buffer[0]);
-
- mod_ctype.wfloat(-3.4028234663852886e+38,
- 'big', buffer, 0);
- ASSERT.equal(0xff, buffer[0]);
- ASSERT.equal(0x7f, buffer[1]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[3]);
- mod_ctype.wfloat(-3.4028234663852886e+38,
- 'little', buffer, 0);
- ASSERT.equal(0xff, buffer[3]);
- ASSERT.equal(0x7f, buffer[2]);
- ASSERT.equal(0xff, buffer[1]);
- ASSERT.equal(0xff, buffer[0]);
-
- /* Smallest normalied number +/- 1.1754943508222875e-38 */
-
- mod_ctype.wfloat(1.1754943508222875e-38,
- 'big', buffer, 0);
- ASSERT.equal(0x00, buffer[0]);
- ASSERT.equal(0x80, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- mod_ctype.wfloat(1.1754943508222875e-38,
- 'little', buffer, 0);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x80, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
- mod_ctype.wfloat(-1.1754943508222875e-38,
- 'big', buffer, 0);
- ASSERT.equal(0x80, buffer[0]);
- ASSERT.equal(0x80, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- mod_ctype.wfloat(-1.1754943508222875e-38,
- 'little', buffer, 0);
- ASSERT.equal(0x80, buffer[3]);
- ASSERT.equal(0x80, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
- /* Smallest denormalized number 1.401298464324817e-45 */
- mod_ctype.wfloat(1.401298464324817e-45,
- 'big', buffer, 0);
- ASSERT.equal(0x00, buffer[0]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x01, buffer[3]);
- mod_ctype.wfloat(1.401298464324817e-45,
- 'little', buffer, 0);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x01, buffer[0]);
-
- mod_ctype.wfloat(-1.401298464324817e-45,
- 'big', buffer, 0);
- ASSERT.equal(0x80, buffer[0]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x01, buffer[3]);
- mod_ctype.wfloat(-1.401298464324817e-45,
- 'little', buffer, 0);
- ASSERT.equal(0x80, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x01, buffer[0]);
-
- /* Largest denormalized value +/- 1.1754942106924411e-38 */
-
- mod_ctype.wfloat(1.1754942106924411e-38,
- 'big', buffer, 0);
- ASSERT.equal(0x00, buffer[0]);
- ASSERT.equal(0x7f, buffer[1]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[3]);
- mod_ctype.wfloat(1.1754942106924411e-38,
- 'little', buffer, 0);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x7f, buffer[2]);
- ASSERT.equal(0xff, buffer[1]);
- ASSERT.equal(0xff, buffer[0]);
-
- mod_ctype.wfloat(-1.1754942106924411e-38,
- 'big', buffer, 0);
- ASSERT.equal(0x80, buffer[0]);
- ASSERT.equal(0x7f, buffer[1]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[3]);
- mod_ctype.wfloat(-1.1754942106924411e-38,
- 'little', buffer, 0);
- ASSERT.equal(0x80, buffer[3]);
- ASSERT.equal(0x7f, buffer[2]);
- ASSERT.equal(0xff, buffer[1]);
- ASSERT.equal(0xff, buffer[0]);
-
- /* Do some quick offset testing */
- buffer = new Buffer(6);
- mod_ctype.wfloat(-1.2027516403607578e-32,
- 'big', buffer, 2);
- ASSERT.equal(0x8a, buffer[2]);
- ASSERT.equal(0x79, buffer[3]);
- ASSERT.equal(0xcd, buffer[4]);
- ASSERT.equal(0x3f, buffer[5]);
-
- mod_ctype.wfloat(-1.2027516403607578e-32,
- 'little', buffer, 2);
- ASSERT.equal(0x8a, buffer[5]);
- ASSERT.equal(0x79, buffer[4]);
- ASSERT.equal(0xcd, buffer[3]);
- ASSERT.equal(0x3f, buffer[2]);
-
-}
-
-function testdouble()
-{
- var buffer = new Buffer(10);
-
- /* Check 0 */
- mod_ctype.wdouble(0, 'big', buffer, 0);
- ASSERT.equal(0x00, buffer[0]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x00, buffer[7]);
- mod_ctype.wdouble(0, 'little', buffer, 0);
- ASSERT.equal(0x00, buffer[7]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
- /* Check NaN */
- /* Similar to floats we are only generating a subset of values */
- mod_ctype.wdouble(NaN, 'big', buffer, 0);
- ASSERT.equal(0x7f, buffer[0]);
- ASSERT.equal(0xf0, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x17, buffer[7]);
- mod_ctype.wdouble(NaN, 'little', buffer, 0);
- ASSERT.equal(0x7f, buffer[7]);
- ASSERT.equal(0xf0, buffer[6]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x17, buffer[0]);
-
- /* pos inf */
- mod_ctype.wdouble(Number.POSITIVE_INFINITY,
- 'big', buffer, 0);
- ASSERT.equal(0x7f, buffer[0]);
- ASSERT.equal(0xf0, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x00, buffer[7]);
- mod_ctype.wdouble(Number.POSITIVE_INFINITY,
- 'little', buffer, 0);
- ASSERT.equal(0x7f, buffer[7]);
- ASSERT.equal(0xf0, buffer[6]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
- /* neg inf */
- mod_ctype.wdouble(Number.NEGATIVE_INFINITY,
- 'big', buffer, 0);
- ASSERT.equal(0xff, buffer[0]);
- ASSERT.equal(0xf0, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x00, buffer[7]);
- mod_ctype.wdouble(Number.NEGATIVE_INFINITY,
- 'little', buffer, 0);
- ASSERT.equal(0xff, buffer[7]);
- ASSERT.equal(0xf0, buffer[6]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
- /* Simple normalized values */
-
- /* +/- 1.125 */
- mod_ctype.wdouble(1.125,
- 'big', buffer, 0);
- ASSERT.equal(0x3f, buffer[0]);
- ASSERT.equal(0xf2, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x00, buffer[7]);
-
- mod_ctype.wdouble(1.125,
- 'little', buffer, 0);
- ASSERT.equal(0x3f, buffer[7]);
- ASSERT.equal(0xf2, buffer[6]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
- mod_ctype.wdouble(-1.125,
- 'big', buffer, 0);
- ASSERT.equal(0xbf, buffer[0]);
- ASSERT.equal(0xf2, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x00, buffer[7]);
-
- mod_ctype.wdouble(-1.125,
- 'little', buffer, 0);
- ASSERT.equal(0xbf, buffer[7]);
- ASSERT.equal(0xf2, buffer[6]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
-
- /* +/- 1.4397318913736026e+283 */
- mod_ctype.wdouble(1.4397318913736026e+283,
- 'big', buffer, 0);
- ASSERT.equal(0x7a, buffer[0]);
- ASSERT.equal(0xb8, buffer[1]);
- ASSERT.equal(0xc9, buffer[2]);
- ASSERT.equal(0x34, buffer[3]);
- ASSERT.equal(0x72, buffer[4]);
- ASSERT.equal(0x16, buffer[5]);
- ASSERT.equal(0xf9, buffer[6]);
- ASSERT.equal(0x0e, buffer[7]);
-
- mod_ctype.wdouble(1.4397318913736026e+283,
- 'little', buffer, 0);
- ASSERT.equal(0x7a, buffer[7]);
- ASSERT.equal(0xb8, buffer[6]);
- ASSERT.equal(0xc9, buffer[5]);
- ASSERT.equal(0x34, buffer[4]);
- ASSERT.equal(0x72, buffer[3]);
- ASSERT.equal(0x16, buffer[2]);
- ASSERT.equal(0xf9, buffer[1]);
- ASSERT.equal(0x0e, buffer[0]);
-
- mod_ctype.wdouble(-1.4397318913736026e+283,
- 'big', buffer, 0);
- ASSERT.equal(0xfa, buffer[0]);
- ASSERT.equal(0xb8, buffer[1]);
- ASSERT.equal(0xc9, buffer[2]);
- ASSERT.equal(0x34, buffer[3]);
- ASSERT.equal(0x72, buffer[4]);
- ASSERT.equal(0x16, buffer[5]);
- ASSERT.equal(0xf9, buffer[6]);
- ASSERT.equal(0x0e, buffer[7]);
-
- mod_ctype.wdouble(-1.4397318913736026e+283,
- 'little', buffer, 0);
- ASSERT.equal(0xfa, buffer[7]);
- ASSERT.equal(0xb8, buffer[6]);
- ASSERT.equal(0xc9, buffer[5]);
- ASSERT.equal(0x34, buffer[4]);
- ASSERT.equal(0x72, buffer[3]);
- ASSERT.equal(0x16, buffer[2]);
- ASSERT.equal(0xf9, buffer[1]);
- ASSERT.equal(0x0e, buffer[0]);
-
- /* Denormalized values */
- /* +/- 8.82521232268344e-309 */
- mod_ctype.wdouble(8.82521232268344e-309,
- 'big', buffer, 0);
- ASSERT.equal(0x00, buffer[0]);
- ASSERT.equal(0x06, buffer[1]);
- ASSERT.equal(0x58, buffer[2]);
- ASSERT.equal(0x94, buffer[3]);
- ASSERT.equal(0x13, buffer[4]);
- ASSERT.equal(0x27, buffer[5]);
- ASSERT.equal(0x8a, buffer[6]);
- ASSERT.equal(0xcd, buffer[7]);
-
- mod_ctype.wdouble(8.82521232268344e-309,
- 'little', buffer, 0);
- ASSERT.equal(0x00, buffer[7]);
- ASSERT.equal(0x06, buffer[6]);
- ASSERT.equal(0x58, buffer[5]);
- ASSERT.equal(0x94, buffer[4]);
- ASSERT.equal(0x13, buffer[3]);
- ASSERT.equal(0x27, buffer[2]);
- ASSERT.equal(0x8a, buffer[1]);
- ASSERT.equal(0xcd, buffer[0]);
-
- mod_ctype.wdouble(-8.82521232268344e-309,
- 'big', buffer, 0);
- ASSERT.equal(0x80, buffer[0]);
- ASSERT.equal(0x06, buffer[1]);
- ASSERT.equal(0x58, buffer[2]);
- ASSERT.equal(0x94, buffer[3]);
- ASSERT.equal(0x13, buffer[4]);
- ASSERT.equal(0x27, buffer[5]);
- ASSERT.equal(0x8a, buffer[6]);
- ASSERT.equal(0xcd, buffer[7]);
-
- mod_ctype.wdouble(-8.82521232268344e-309,
- 'little', buffer, 0);
- ASSERT.equal(0x80, buffer[7]);
- ASSERT.equal(0x06, buffer[6]);
- ASSERT.equal(0x58, buffer[5]);
- ASSERT.equal(0x94, buffer[4]);
- ASSERT.equal(0x13, buffer[3]);
- ASSERT.equal(0x27, buffer[2]);
- ASSERT.equal(0x8a, buffer[1]);
- ASSERT.equal(0xcd, buffer[0]);
-
-
- /* Edge cases, maximum and minimum values */
-
- /* Smallest denormalized value 5e-324 */
- mod_ctype.wdouble(5e-324,
- 'big', buffer, 0);
- ASSERT.equal(0x00, buffer[0]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x01, buffer[7]);
-
- mod_ctype.wdouble(5e-324,
- 'little', buffer, 0);
- ASSERT.equal(0x00, buffer[7]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x01, buffer[0]);
-
- mod_ctype.wdouble(-5e-324,
- 'big', buffer, 0);
- ASSERT.equal(0x80, buffer[0]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x01, buffer[7]);
-
- mod_ctype.wdouble(-5e-324,
- 'little', buffer, 0);
- ASSERT.equal(0x80, buffer[7]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x01, buffer[0]);
-
-
-
- /* Largest denormalized value 2.225073858507201e-308 */
- mod_ctype.wdouble(2.225073858507201e-308,
- 'big', buffer, 0);
- ASSERT.equal(0x00, buffer[0]);
- ASSERT.equal(0x0f, buffer[1]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[3]);
- ASSERT.equal(0xff, buffer[4]);
- ASSERT.equal(0xff, buffer[5]);
- ASSERT.equal(0xff, buffer[6]);
- ASSERT.equal(0xff, buffer[7]);
-
- mod_ctype.wdouble(2.225073858507201e-308,
- 'little', buffer, 0);
- ASSERT.equal(0x00, buffer[7]);
- ASSERT.equal(0x0f, buffer[6]);
- ASSERT.equal(0xff, buffer[5]);
- ASSERT.equal(0xff, buffer[4]);
- ASSERT.equal(0xff, buffer[3]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[1]);
- ASSERT.equal(0xff, buffer[0]);
-
- mod_ctype.wdouble(-2.225073858507201e-308,
- 'big', buffer, 0);
- ASSERT.equal(0x80, buffer[0]);
- ASSERT.equal(0x0f, buffer[1]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[3]);
- ASSERT.equal(0xff, buffer[4]);
- ASSERT.equal(0xff, buffer[5]);
- ASSERT.equal(0xff, buffer[6]);
- ASSERT.equal(0xff, buffer[7]);
-
- mod_ctype.wdouble(-2.225073858507201e-308,
- 'little', buffer, 0);
- ASSERT.equal(0x80, buffer[7]);
- ASSERT.equal(0x0f, buffer[6]);
- ASSERT.equal(0xff, buffer[5]);
- ASSERT.equal(0xff, buffer[4]);
- ASSERT.equal(0xff, buffer[3]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[1]);
- ASSERT.equal(0xff, buffer[0]);
-
-
- /* Smallest normalized value 2.2250738585072014e-308 */
- mod_ctype.wdouble(2.2250738585072014e-308,
- 'big', buffer, 0);
- ASSERT.equal(0x00, buffer[0]);
- ASSERT.equal(0x10, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x00, buffer[7]);
-
- mod_ctype.wdouble(2.2250738585072014e-308,
- 'little', buffer, 0);
- ASSERT.equal(0x00, buffer[7]);
- ASSERT.equal(0x10, buffer[6]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
- mod_ctype.wdouble(-2.2250738585072014e-308,
- 'big', buffer, 0);
- ASSERT.equal(0x80, buffer[0]);
- ASSERT.equal(0x10, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x00, buffer[7]);
-
- mod_ctype.wdouble(-2.2250738585072014e-308,
- 'little', buffer, 0);
- ASSERT.equal(0x80, buffer[7]);
- ASSERT.equal(0x10, buffer[6]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[4]);
- ASSERT.equal(0x00, buffer[3]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[0]);
-
-
- /* Largest normalized value 1.7976931348623157e+308 */
- mod_ctype.wdouble(1.7976931348623157e+308,
- 'big', buffer, 0);
- ASSERT.equal(0x7f, buffer[0]);
- ASSERT.equal(0xef, buffer[1]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[3]);
- ASSERT.equal(0xff, buffer[4]);
- ASSERT.equal(0xff, buffer[5]);
- ASSERT.equal(0xff, buffer[6]);
- ASSERT.equal(0xff, buffer[7]);
-
- mod_ctype.wdouble(1.7976931348623157e+308,
- 'little', buffer, 0);
- ASSERT.equal(0x7f, buffer[7]);
- ASSERT.equal(0xef, buffer[6]);
- ASSERT.equal(0xff, buffer[5]);
- ASSERT.equal(0xff, buffer[4]);
- ASSERT.equal(0xff, buffer[3]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[1]);
- ASSERT.equal(0xff, buffer[0]);
-
- mod_ctype.wdouble(-1.7976931348623157e+308,
- 'big', buffer, 0);
- ASSERT.equal(0xff, buffer[0]);
- ASSERT.equal(0xef, buffer[1]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[3]);
- ASSERT.equal(0xff, buffer[4]);
- ASSERT.equal(0xff, buffer[5]);
- ASSERT.equal(0xff, buffer[6]);
- ASSERT.equal(0xff, buffer[7]);
-
- mod_ctype.wdouble(-1.7976931348623157e+308,
- 'little', buffer, 0);
- ASSERT.equal(0xff, buffer[7]);
- ASSERT.equal(0xef, buffer[6]);
- ASSERT.equal(0xff, buffer[5]);
- ASSERT.equal(0xff, buffer[4]);
- ASSERT.equal(0xff, buffer[3]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xff, buffer[1]);
- ASSERT.equal(0xff, buffer[0]);
-
-
- /* Try offsets */
- buffer[0] = 0xde;
- buffer[1] = 0xad;
- buffer[2] = 0xbe;
- buffer[3] = 0xef;
- buffer[4] = 0xba;
- buffer[5] = 0xdd;
- buffer[6] = 0xca;
- buffer[7] = 0xfe;
- buffer[8] = 0x16;
- buffer[9] = 0x79;
-
- mod_ctype.wdouble(-0.000015130017658081283,
- 'big', buffer, 2);
- ASSERT.equal(0xbe, buffer[2]);
- ASSERT.equal(0xef, buffer[3]);
- ASSERT.equal(0xba, buffer[4]);
- ASSERT.equal(0xdd, buffer[5]);
- ASSERT.equal(0xca, buffer[6]);
- ASSERT.equal(0xfe, buffer[7]);
- ASSERT.equal(0x16, buffer[8]);
- ASSERT.equal(0x79, buffer[9]);
-
- mod_ctype.wdouble(-0.000015130017658081283,
- 'little', buffer, 2);
- ASSERT.equal(0xbe, buffer[9]);
- ASSERT.equal(0xef, buffer[8]);
- ASSERT.equal(0xba, buffer[7]);
- ASSERT.equal(0xdd, buffer[6]);
- ASSERT.equal(0xca, buffer[5]);
- ASSERT.equal(0xfe, buffer[4]);
- ASSERT.equal(0x16, buffer[3]);
- ASSERT.equal(0x79, buffer[2]);
-}
-
-testfloat();
-testdouble();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js
deleted file mode 100644
index 1ffdac09d5..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.64.js
+++ /dev/null
@@ -1,638 +0,0 @@
-/*
- * Test our ability to read and write signed 64-bit integers.
- */
-
-var mod_ctype = require('../../../ctio.js');
-var ASSERT = require('assert');
-
-function testRead()
-{
- var res, data;
- data = new Buffer(10);
-
- data[0] = 0x32;
- data[1] = 0x65;
- data[2] = 0x42;
- data[3] = 0x56;
- data[4] = 0x23;
- data[5] = 0xff;
- data[6] = 0xff;
- data[7] = 0xff;
- data[8] = 0x89;
- data[9] = 0x11;
- res = mod_ctype.rsint64(data, 'big', 0);
- ASSERT.equal(0x32654256, res[0]);
- ASSERT.equal(0x23ffffff, res[1]);
- res = mod_ctype.rsint64(data, 'big', 1);
- ASSERT.equal(0x65425623, res[0]);
- ASSERT.equal(0xffffff89, res[1]);
- res = mod_ctype.rsint64(data, 'big', 2);
- ASSERT.equal(0x425623ff, res[0]);
- ASSERT.equal(0xffff8911, res[1]);
- res = mod_ctype.rsint64(data, 'little', 0);
- ASSERT.equal(-0x000000dc, res[0]);
- ASSERT.equal(-0xa9bd9ace, res[1]);
- res = mod_ctype.rsint64(data, 'little', 1);
- ASSERT.equal(-0x76000000, res[0]);
- ASSERT.equal(-0xdca9bd9b, res[1]);
- res = mod_ctype.rsint64(data, 'little', 2);
- ASSERT.equal(0x1189ffff, res[0]);
- ASSERT.equal(0xff235642, res[1]);
-
- data.fill(0x00);
- res = mod_ctype.rsint64(data, 'big', 0);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(0x00000000, res[1]);
- res = mod_ctype.rsint64(data, 'big', 1);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(0x00000000, res[1]);
- res = mod_ctype.rsint64(data, 'big', 2);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(0x00000000, res[1]);
- res = mod_ctype.rsint64(data, 'little', 0);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(0x00000000, res[1]);
- res = mod_ctype.rsint64(data, 'little', 1);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(0x00000000, res[1]);
- res = mod_ctype.rsint64(data, 'little', 2);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(0x00000000, res[1]);
-
- data.fill(0xff);
- res = mod_ctype.rsint64(data, 'big', 0);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(-1, res[1]);
- res = mod_ctype.rsint64(data, 'big', 1);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(-1, res[1]);
- res = mod_ctype.rsint64(data, 'big', 2);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(-1, res[1]);
- res = mod_ctype.rsint64(data, 'little', 0);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(-1, res[1]);
- res = mod_ctype.rsint64(data, 'little', 1);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(-1, res[1]);
- res = mod_ctype.rsint64(data, 'little', 2);
- ASSERT.equal(0x00000000, res[0]);
- ASSERT.equal(-1, res[1]);
-
- data[0] = 0x80;
- data[1] = 0x00;
- data[2] = 0x00;
- data[3] = 0x00;
- data[4] = 0x00;
- data[5] = 0x00;
- data[6] = 0x00;
- data[7] = 0x00;
- res = mod_ctype.rsint64(data, 'big', 0);
- ASSERT.equal(-0x80000000, res[0]);
- ASSERT.equal(0, res[1]);
-
-
- data[7] = 0x80;
- data[6] = 0x00;
- data[5] = 0x00;
- data[4] = 0x00;
- data[3] = 0x00;
- data[2] = 0x00;
- data[1] = 0x00;
- data[0] = 0x00;
- res = mod_ctype.rsint64(data, 'little', 0);
- ASSERT.equal(-0x80000000, res[0]);
- ASSERT.equal(0, res[1]);
-
- data[0] = 0x80;
- data[1] = 0x00;
- data[2] = 0x00;
- data[3] = 0x00;
- data[4] = 0x00;
- data[5] = 0x00;
- data[6] = 0x00;
- data[7] = 0x01;
- res = mod_ctype.rsint64(data, 'big', 0);
- ASSERT.equal(-0x7fffffff, res[0]);
- ASSERT.equal(-0xffffffff, res[1]);
-
-
-}
-
-function testWriteZero()
-{
- var data, buf;
- buf = new Buffer(10);
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wsint64(data, 'big', buf, 0);
- ASSERT.equal(0, buf[0]);
- ASSERT.equal(0, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wsint64(data, 'big', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wsint64(data, 'big', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0, buf[8]);
- ASSERT.equal(0, buf[9]);
-
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wsint64(data, 'little', buf, 0);
- ASSERT.equal(0, buf[0]);
- ASSERT.equal(0, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wsint64(data, 'little', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wsint64(data, 'little', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0, buf[8]);
- ASSERT.equal(0, buf[9]);
-}
-
-/*
- * Also include tests that are going to force us to go into a negative value and
- * insure that it's written correctly.
- */
-function testWrite()
-{
- var data, buf;
-
- buf = new Buffer(10);
- data = [ 0x234456, 0x87 ];
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'big', buf, 0);
- ASSERT.equal(0x00, buf[0]);
- ASSERT.equal(0x23, buf[1]);
- ASSERT.equal(0x44, buf[2]);
- ASSERT.equal(0x56, buf[3]);
- ASSERT.equal(0x00, buf[4]);
- ASSERT.equal(0x00, buf[5]);
- ASSERT.equal(0x00, buf[6]);
- ASSERT.equal(0x87, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'big', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x00, buf[1]);
- ASSERT.equal(0x23, buf[2]);
- ASSERT.equal(0x44, buf[3]);
- ASSERT.equal(0x56, buf[4]);
- ASSERT.equal(0x00, buf[5]);
- ASSERT.equal(0x00, buf[6]);
- ASSERT.equal(0x00, buf[7]);
- ASSERT.equal(0x87, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'big', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x23, buf[3]);
- ASSERT.equal(0x44, buf[4]);
- ASSERT.equal(0x56, buf[5]);
- ASSERT.equal(0x00, buf[6]);
- ASSERT.equal(0x00, buf[7]);
- ASSERT.equal(0x00, buf[8]);
- ASSERT.equal(0x87, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'little', buf, 0);
- ASSERT.equal(0x87, buf[0]);
- ASSERT.equal(0x00, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x00, buf[3]);
- ASSERT.equal(0x56, buf[4]);
- ASSERT.equal(0x44, buf[5]);
- ASSERT.equal(0x23, buf[6]);
- ASSERT.equal(0x00, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'little', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x87, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x00, buf[3]);
- ASSERT.equal(0x00, buf[4]);
- ASSERT.equal(0x56, buf[5]);
- ASSERT.equal(0x44, buf[6]);
- ASSERT.equal(0x23, buf[7]);
- ASSERT.equal(0x00, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'little', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0x87, buf[2]);
- ASSERT.equal(0x00, buf[3]);
- ASSERT.equal(0x00, buf[4]);
- ASSERT.equal(0x00, buf[5]);
- ASSERT.equal(0x56, buf[6]);
- ASSERT.equal(0x44, buf[7]);
- ASSERT.equal(0x23, buf[8]);
- ASSERT.equal(0x00, buf[9]);
-
- data = [0x3421, 0x34abcdba];
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'big', buf, 0);
- ASSERT.equal(0x00, buf[0]);
- ASSERT.equal(0x00, buf[1]);
- ASSERT.equal(0x34, buf[2]);
- ASSERT.equal(0x21, buf[3]);
- ASSERT.equal(0x34, buf[4]);
- ASSERT.equal(0xab, buf[5]);
- ASSERT.equal(0xcd, buf[6]);
- ASSERT.equal(0xba, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'big', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x00, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x34, buf[3]);
- ASSERT.equal(0x21, buf[4]);
- ASSERT.equal(0x34, buf[5]);
- ASSERT.equal(0xab, buf[6]);
- ASSERT.equal(0xcd, buf[7]);
- ASSERT.equal(0xba, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'big', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x00, buf[3]);
- ASSERT.equal(0x34, buf[4]);
- ASSERT.equal(0x21, buf[5]);
- ASSERT.equal(0x34, buf[6]);
- ASSERT.equal(0xab, buf[7]);
- ASSERT.equal(0xcd, buf[8]);
- ASSERT.equal(0xba, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'little', buf, 0);
- ASSERT.equal(0xba, buf[0]);
- ASSERT.equal(0xcd, buf[1]);
- ASSERT.equal(0xab, buf[2]);
- ASSERT.equal(0x34, buf[3]);
- ASSERT.equal(0x21, buf[4]);
- ASSERT.equal(0x34, buf[5]);
- ASSERT.equal(0x00, buf[6]);
- ASSERT.equal(0x00, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'little', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0xba, buf[1]);
- ASSERT.equal(0xcd, buf[2]);
- ASSERT.equal(0xab, buf[3]);
- ASSERT.equal(0x34, buf[4]);
- ASSERT.equal(0x21, buf[5]);
- ASSERT.equal(0x34, buf[6]);
- ASSERT.equal(0x00, buf[7]);
- ASSERT.equal(0x00, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'little', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0xba, buf[2]);
- ASSERT.equal(0xcd, buf[3]);
- ASSERT.equal(0xab, buf[4]);
- ASSERT.equal(0x34, buf[5]);
- ASSERT.equal(0x21, buf[6]);
- ASSERT.equal(0x34, buf[7]);
- ASSERT.equal(0x00, buf[8]);
- ASSERT.equal(0x00, buf[9]);
-
-
- data = [ -0x80000000, 0 ];
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'big', buf, 0);
- ASSERT.equal(0x80, buf[0]);
- ASSERT.equal(0x00, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x00, buf[3]);
- ASSERT.equal(0x00, buf[4]);
- ASSERT.equal(0x00, buf[5]);
- ASSERT.equal(0x00, buf[6]);
- ASSERT.equal(0x00, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'little', buf, 0);
- ASSERT.equal(0x00, buf[0]);
- ASSERT.equal(0x00, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x00, buf[3]);
- ASSERT.equal(0x00, buf[4]);
- ASSERT.equal(0x00, buf[5]);
- ASSERT.equal(0x00, buf[6]);
- ASSERT.equal(0x80, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- data = [ -0x7fffffff, -0xffffffff ];
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'big', buf, 0);
- ASSERT.equal(0x80, buf[0]);
- ASSERT.equal(0x00, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x00, buf[3]);
- ASSERT.equal(0x00, buf[4]);
- ASSERT.equal(0x00, buf[5]);
- ASSERT.equal(0x00, buf[6]);
- ASSERT.equal(0x01, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'little', buf, 0);
- ASSERT.equal(0x01, buf[0]);
- ASSERT.equal(0x00, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x00, buf[3]);
- ASSERT.equal(0x00, buf[4]);
- ASSERT.equal(0x00, buf[5]);
- ASSERT.equal(0x00, buf[6]);
- ASSERT.equal(0x80, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- data = [ 0x0, -0x1];
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'big', buf, 0);
- ASSERT.equal(0xff, buf[0]);
- ASSERT.equal(0xff, buf[1]);
- ASSERT.equal(0xff, buf[2]);
- ASSERT.equal(0xff, buf[3]);
- ASSERT.equal(0xff, buf[4]);
- ASSERT.equal(0xff, buf[5]);
- ASSERT.equal(0xff, buf[6]);
- ASSERT.equal(0xff, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wsint64(data, 'little', buf, 0);
- ASSERT.equal(0xff, buf[0]);
- ASSERT.equal(0xff, buf[1]);
- ASSERT.equal(0xff, buf[2]);
- ASSERT.equal(0xff, buf[3]);
- ASSERT.equal(0xff, buf[4]);
- ASSERT.equal(0xff, buf[5]);
- ASSERT.equal(0xff, buf[6]);
- ASSERT.equal(0xff, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-}
-
-/*
- * Make sure we catch invalid writes.
- */
-function testWriteInvalid()
-{
- var data, buf;
-
- /* Buffer too small */
- buf = new Buffer(4);
- data = [ 0, 0];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 0);
- }, Error, 'buffer too small');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 0);
- }, Error, 'buffer too small');
-
- /* Beyond the end of the buffer */
- buf = new Buffer(12);
- data = [ 0, 0];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 11);
- }, Error, 'write beyond end of buffer');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 11);
- }, Error, 'write beyond end of buffer');
-
- /* Write fractional values */
- buf = new Buffer(12);
- data = [ 3.33, 0 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write fractions');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write fractions');
-
- data = [ 0, 3.3 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write fractions');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write fractions');
-
- data = [ -3.33, 0 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write fractions');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write fractions');
-
- data = [ 0, -3.3 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write fractions');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write fractions');
-
- data = [ 3.33, 2.42 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write fractions');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write fractions');
-
- data = [ 3.33, -2.42 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write fractions');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write fractions');
-
- data = [ -3.33, -2.42 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write fractions');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write fractions');
-
- data = [ -3.33, 2.42 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write fractions');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write fractions');
-
- /* Signs don't match */
- buf = new Buffer(12);
- data = [ 0x800000, -0x32 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-
- data = [ -0x800000, 0x32 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-
- /* Write values that are too large */
- buf = new Buffer(12);
- data = [ 0x80000000, 0 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-
- data = [ 0x7fffffff, 0x100000000 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-
- data = [ 0x00, 0x800000000 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-
- data = [ 0xffffffffff, 0xffffff238 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-
- data = [ 0x23, 0xffffff238 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-
- data = [ -0x80000000, -0xfff238 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-
- data = [ -0x80000004, -0xfff238 ];
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wsint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-}
-
-
-testRead();
-testWrite();
-testWriteZero();
-testWriteInvalid();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js
deleted file mode 100644
index 5236d2680e..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.rint.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Tests to verify we're reading in signed integers correctly
- */
-var mod_ctype = require('../../../ctio.js');
-var ASSERT = require('assert');
-
-/*
- * Test 8 bit signed integers
- */
-function test8()
-{
- var data = new Buffer(4);
-
- data[0] = 0x23;
- ASSERT.equal(0x23, mod_ctype.rsint8(data, 'big', 0));
- ASSERT.equal(0x23, mod_ctype.rsint8(data, 'little', 0));
-
- data[0] = 0xff;
- ASSERT.equal(-1, mod_ctype.rsint8(data, 'big', 0));
- ASSERT.equal(-1, mod_ctype.rsint8(data, 'little', 0));
-
- data[0] = 0x87;
- data[1] = 0xab;
- data[2] = 0x7c;
- data[3] = 0xef;
- ASSERT.equal(-121, mod_ctype.rsint8(data, 'big', 0));
- ASSERT.equal(-85, mod_ctype.rsint8(data, 'big', 1));
- ASSERT.equal(124, mod_ctype.rsint8(data, 'big', 2));
- ASSERT.equal(-17, mod_ctype.rsint8(data, 'big', 3));
- ASSERT.equal(-121, mod_ctype.rsint8(data, 'little', 0));
- ASSERT.equal(-85, mod_ctype.rsint8(data, 'little', 1));
- ASSERT.equal(124, mod_ctype.rsint8(data, 'little', 2));
- ASSERT.equal(-17, mod_ctype.rsint8(data, 'little', 3));
-}
-
-function test16()
-{
- var buffer = new Buffer(6);
- buffer[0] = 0x16;
- buffer[1] = 0x79;
- ASSERT.equal(0x1679, mod_ctype.rsint16(buffer, 'big', 0));
- ASSERT.equal(0x7916, mod_ctype.rsint16(buffer, 'little', 0));
-
- buffer[0] = 0xff;
- buffer[1] = 0x80;
- ASSERT.equal(-128, mod_ctype.rsint16(buffer, 'big', 0));
- ASSERT.equal(-32513, mod_ctype.rsint16(buffer, 'little', 0));
-
- /* test offset with weenix */
- buffer[0] = 0x77;
- buffer[1] = 0x65;
- buffer[2] = 0x65;
- buffer[3] = 0x6e;
- buffer[4] = 0x69;
- buffer[5] = 0x78;
- ASSERT.equal(0x7765, mod_ctype.rsint16(buffer, 'big', 0));
- ASSERT.equal(0x6565, mod_ctype.rsint16(buffer, 'big', 1));
- ASSERT.equal(0x656e, mod_ctype.rsint16(buffer, 'big', 2));
- ASSERT.equal(0x6e69, mod_ctype.rsint16(buffer, 'big', 3));
- ASSERT.equal(0x6978, mod_ctype.rsint16(buffer, 'big', 4));
- ASSERT.equal(0x6577, mod_ctype.rsint16(buffer, 'little', 0));
- ASSERT.equal(0x6565, mod_ctype.rsint16(buffer, 'little', 1));
- ASSERT.equal(0x6e65, mod_ctype.rsint16(buffer, 'little', 2));
- ASSERT.equal(0x696e, mod_ctype.rsint16(buffer, 'little', 3));
- ASSERT.equal(0x7869, mod_ctype.rsint16(buffer, 'little', 4));
-}
-
-function test32()
-{
- var buffer = new Buffer(6);
- buffer[0] = 0x43;
- buffer[1] = 0x53;
- buffer[2] = 0x16;
- buffer[3] = 0x79;
- ASSERT.equal(0x43531679, mod_ctype.rsint32(buffer, 'big', 0));
- ASSERT.equal(0x79165343, mod_ctype.rsint32(buffer, 'little', 0));
-
- buffer[0] = 0xff;
- buffer[1] = 0xfe;
- buffer[2] = 0xef;
- buffer[3] = 0xfa;
- ASSERT.equal(-69638, mod_ctype.rsint32(buffer, 'big', 0));
- ASSERT.equal(-84934913, mod_ctype.rsint32(buffer, 'little', 0));
-
- buffer[0] = 0x42;
- buffer[1] = 0xc3;
- buffer[2] = 0x95;
- buffer[3] = 0xa9;
- buffer[4] = 0x36;
- buffer[5] = 0x17;
- ASSERT.equal(0x42c395a9, mod_ctype.rsint32(buffer, 'big', 0));
- ASSERT.equal(-1013601994, mod_ctype.rsint32(buffer, 'big', 1));
- ASSERT.equal(-1784072681, mod_ctype.rsint32(buffer, 'big', 2));
- ASSERT.equal(-1449802942, mod_ctype.rsint32(buffer, 'little', 0));
- ASSERT.equal(917083587, mod_ctype.rsint32(buffer, 'little', 1));
- ASSERT.equal(389458325, mod_ctype.rsint32(buffer, 'little', 2));
-}
-
-test8();
-test16();
-test32();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js
deleted file mode 100644
index 5488177b4c..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wbounds.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Test to make sure that we properly are erroring whenever we try to write
- * beyond the size of the integer.
- */
-
-var mod_ctio = require('../../../ctio.js');
-var mod_assert = require('assert');
-var tb = new Buffer(16); /* Largest buffer we'll need */
-
-var cases = [
- { func:
- function () {
- mod_ctio.wsint8(0x80, 'big', tb, 0);
- }, test: '+int8_t' },
- { func:
- function () {
- mod_ctio.wsint8(-0x81, 'big', tb, 0);
- }, test: '-int8_t' },
-
- { func:
- function () {
- mod_ctio.wsint16(0x8000, 'big', tb, 0);
- }, test: '+int16_t' },
- { func:
- function () {
- mod_ctio.wsint16(-0x8001, 'big', tb, 0);
- }, test: '-int16_t' },
- { func:
- function () {
- mod_ctio.wsint32(0x80000000, 'big', tb, 0);
- }, test: '+int32_t' },
- { func:
- function () {
- mod_ctio.wsint32(-0x80000001, 'big', tb, 0);
- }, test: '-int32_t' },
- { func:
- function () {
- mod_ctio.wsint64([ 0x80000000, 0 ], 'big', tb, 0);
- }, test: '+int64_t' },
- { func:
- function () {
- mod_ctio.wsint64([ -0x80000000, -1 ], 'big', tb, 0);
- }, test: '-int64_t' }
-];
-
-function test()
-{
- var ii;
- for (ii = 0; ii < cases.length; ii++)
- mod_assert.throws(cases[ii]['func'], Error, cases[ii]['test']);
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js
deleted file mode 100644
index 98b6a32a87..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/int/tst.wint.js
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Tests to verify we're writing signed integers correctly
- */
-var mod_ctype = require('../../../ctio.js');
-var ASSERT = require('assert');
-
-function test8()
-{
- var buffer = new Buffer(4);
- mod_ctype.wsint8(0x23, 'big', buffer, 0);
- mod_ctype.wsint8(0x23, 'little', buffer, 1);
- mod_ctype.wsint8(-5, 'big', buffer, 2);
- mod_ctype.wsint8(-5, 'little', buffer, 3);
-
- ASSERT.equal(0x23, buffer[0]);
- ASSERT.equal(0x23, buffer[1]);
- ASSERT.equal(0xfb, buffer[2]);
- ASSERT.equal(0xfb, buffer[3]);
-
- /* Make sure we handle truncation correctly */
- ASSERT.throws(function () {
- mod_ctype.wsint8(0xabc, 'big', buffer, 0);
- });
- ASSERT.throws(function () {
- mod_ctype.wsint8(0xabc, 'little', buffer, 0);
- });
-}
-
-function test16()
-{
- var buffer = new Buffer(6);
- mod_ctype.wsint16(0x0023, 'big', buffer, 0);
- mod_ctype.wsint16(0x0023, 'little', buffer, 2);
- ASSERT.equal(0x00, buffer[0]);
- ASSERT.equal(0x23, buffer[1]);
- ASSERT.equal(0x23, buffer[2]);
- ASSERT.equal(0x00, buffer[3]);
- mod_ctype.wsint16(-5, 'big', buffer, 0);
- mod_ctype.wsint16(-5, 'little', buffer, 2);
- ASSERT.equal(0xff, buffer[0]);
- ASSERT.equal(0xfb, buffer[1]);
- ASSERT.equal(0xfb, buffer[2]);
- ASSERT.equal(0xff, buffer[3]);
-
- mod_ctype.wsint16(-1679, 'big', buffer, 1);
- mod_ctype.wsint16(-1679, 'little', buffer, 3);
- ASSERT.equal(0xf9, buffer[1]);
- ASSERT.equal(0x71, buffer[2]);
- ASSERT.equal(0x71, buffer[3]);
- ASSERT.equal(0xf9, buffer[4]);
-}
-
-function test32()
-{
- var buffer = new Buffer(8);
- mod_ctype.wsint32(0x23, 'big', buffer, 0);
- mod_ctype.wsint32(0x23, 'little', buffer, 4);
- ASSERT.equal(0x00, buffer[0]);
- ASSERT.equal(0x00, buffer[1]);
- ASSERT.equal(0x00, buffer[2]);
- ASSERT.equal(0x23, buffer[3]);
- ASSERT.equal(0x23, buffer[4]);
- ASSERT.equal(0x00, buffer[5]);
- ASSERT.equal(0x00, buffer[6]);
- ASSERT.equal(0x00, buffer[7]);
-
- mod_ctype.wsint32(-5, 'big', buffer, 0);
- mod_ctype.wsint32(-5, 'little', buffer, 4);
- ASSERT.equal(0xff, buffer[0]);
- ASSERT.equal(0xff, buffer[1]);
- ASSERT.equal(0xff, buffer[2]);
- ASSERT.equal(0xfb, buffer[3]);
- ASSERT.equal(0xfb, buffer[4]);
- ASSERT.equal(0xff, buffer[5]);
- ASSERT.equal(0xff, buffer[6]);
- ASSERT.equal(0xff, buffer[7]);
-
- mod_ctype.wsint32(-805306713, 'big', buffer, 0);
- mod_ctype.wsint32(-805306713, 'litle', buffer, 4);
- ASSERT.equal(0xcf, buffer[0]);
- ASSERT.equal(0xff, buffer[1]);
- ASSERT.equal(0xfe, buffer[2]);
- ASSERT.equal(0xa7, buffer[3]);
- ASSERT.equal(0xa7, buffer[4]);
- ASSERT.equal(0xfe, buffer[5]);
- ASSERT.equal(0xff, buffer[6]);
- ASSERT.equal(0xcf, buffer[7]);
-}
-
-test8();
-test16();
-test32();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js
deleted file mode 100644
index cf66ac7a57..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.64.js
+++ /dev/null
@@ -1,451 +0,0 @@
-/*
- * Test our ability to read and write unsigned 64-bit integers.
- */
-
-var mod_ctype = require('../../../ctio.js');
-var ASSERT = require('assert');
-
-function testRead()
-{
- var res, data;
- data = new Buffer(10);
-
- data[0] = 0x32;
- data[1] = 0x65;
- data[2] = 0x42;
- data[3] = 0x56;
- data[4] = 0x23;
- data[5] = 0xff;
- data[6] = 0xff;
- data[7] = 0xff;
- data[8] = 0x89;
- data[9] = 0x11;
- res = mod_ctype.ruint64(data, 'big', 0);
- ASSERT.equal(0x32654256, res[0]);
- ASSERT.equal(0x23ffffff, res[1]);
- res = mod_ctype.ruint64(data, 'big', 1);
- ASSERT.equal(0x65425623, res[0]);
- ASSERT.equal(0xffffff89, res[1]);
- res = mod_ctype.ruint64(data, 'big', 2);
- ASSERT.equal(0x425623ff, res[0]);
- ASSERT.equal(0xffff8911, res[1]);
- res = mod_ctype.ruint64(data, 'little', 0);
- ASSERT.equal(0xffffff23, res[0]);
- ASSERT.equal(0x56426532, res[1]);
- res = mod_ctype.ruint64(data, 'little', 1);
- ASSERT.equal(0x89ffffff, res[0]);
- ASSERT.equal(0x23564265, res[1]);
- res = mod_ctype.ruint64(data, 'little', 2);
- ASSERT.equal(0x1189ffff, res[0]);
- ASSERT.equal(0xff235642, res[1]);
-
-}
-
-function testReadOver()
-{
- var res, data;
- data = new Buffer(10);
-
- data[0] = 0x80;
- data[1] = 0xff;
- data[2] = 0x80;
- data[3] = 0xff;
- data[4] = 0x80;
- data[5] = 0xff;
- data[6] = 0x80;
- data[7] = 0xff;
- data[8] = 0x80;
- data[9] = 0xff;
- res = mod_ctype.ruint64(data, 'big', 0);
- ASSERT.equal(0x80ff80ff, res[0]);
- ASSERT.equal(0x80ff80ff, res[1]);
- res = mod_ctype.ruint64(data, 'big', 1);
- ASSERT.equal(0xff80ff80, res[0]);
- ASSERT.equal(0xff80ff80, res[1]);
- res = mod_ctype.ruint64(data, 'big', 2);
- ASSERT.equal(0x80ff80ff, res[0]);
- ASSERT.equal(0x80ff80ff, res[1]);
- res = mod_ctype.ruint64(data, 'little', 0);
- ASSERT.equal(0xff80ff80, res[0]);
- ASSERT.equal(0xff80ff80, res[1]);
- res = mod_ctype.ruint64(data, 'little', 1);
- ASSERT.equal(0x80ff80ff, res[0]);
- ASSERT.equal(0x80ff80ff, res[1]);
- res = mod_ctype.ruint64(data, 'little', 2);
- ASSERT.equal(0xff80ff80, res[0]);
- ASSERT.equal(0xff80ff80, res[1]);
-}
-
-function testWriteZero()
-{
- var data, buf;
- buf = new Buffer(10);
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wuint64(data, 'big', buf, 0);
- ASSERT.equal(0, buf[0]);
- ASSERT.equal(0, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wuint64(data, 'big', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wuint64(data, 'big', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0, buf[8]);
- ASSERT.equal(0, buf[9]);
-
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wuint64(data, 'little', buf, 0);
- ASSERT.equal(0, buf[0]);
- ASSERT.equal(0, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wuint64(data, 'little', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- data = [0, 0];
- mod_ctype.wuint64(data, 'little', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0, buf[2]);
- ASSERT.equal(0, buf[3]);
- ASSERT.equal(0, buf[4]);
- ASSERT.equal(0, buf[5]);
- ASSERT.equal(0, buf[6]);
- ASSERT.equal(0, buf[7]);
- ASSERT.equal(0, buf[8]);
- ASSERT.equal(0, buf[9]);
-}
-
-/*
- * Also include tests that are going to force us to go into a negative value and
- * insure that it's written correctly.
- */
-function testWrite()
-{
- var data, buf;
-
- buf = new Buffer(10);
- data = [ 0x234456, 0x87 ];
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'big', buf, 0);
- ASSERT.equal(0x00, buf[0]);
- ASSERT.equal(0x23, buf[1]);
- ASSERT.equal(0x44, buf[2]);
- ASSERT.equal(0x56, buf[3]);
- ASSERT.equal(0x00, buf[4]);
- ASSERT.equal(0x00, buf[5]);
- ASSERT.equal(0x00, buf[6]);
- ASSERT.equal(0x87, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'big', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x00, buf[1]);
- ASSERT.equal(0x23, buf[2]);
- ASSERT.equal(0x44, buf[3]);
- ASSERT.equal(0x56, buf[4]);
- ASSERT.equal(0x00, buf[5]);
- ASSERT.equal(0x00, buf[6]);
- ASSERT.equal(0x00, buf[7]);
- ASSERT.equal(0x87, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'big', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x23, buf[3]);
- ASSERT.equal(0x44, buf[4]);
- ASSERT.equal(0x56, buf[5]);
- ASSERT.equal(0x00, buf[6]);
- ASSERT.equal(0x00, buf[7]);
- ASSERT.equal(0x00, buf[8]);
- ASSERT.equal(0x87, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'little', buf, 0);
- ASSERT.equal(0x87, buf[0]);
- ASSERT.equal(0x00, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x00, buf[3]);
- ASSERT.equal(0x56, buf[4]);
- ASSERT.equal(0x44, buf[5]);
- ASSERT.equal(0x23, buf[6]);
- ASSERT.equal(0x00, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'little', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x87, buf[1]);
- ASSERT.equal(0x00, buf[2]);
- ASSERT.equal(0x00, buf[3]);
- ASSERT.equal(0x00, buf[4]);
- ASSERT.equal(0x56, buf[5]);
- ASSERT.equal(0x44, buf[6]);
- ASSERT.equal(0x23, buf[7]);
- ASSERT.equal(0x00, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
-
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'little', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0x87, buf[2]);
- ASSERT.equal(0x00, buf[3]);
- ASSERT.equal(0x00, buf[4]);
- ASSERT.equal(0x00, buf[5]);
- ASSERT.equal(0x56, buf[6]);
- ASSERT.equal(0x44, buf[7]);
- ASSERT.equal(0x23, buf[8]);
- ASSERT.equal(0x00, buf[9]);
-
- data = [0xffff3421, 0x34abcdba];
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'big', buf, 0);
- ASSERT.equal(0xff, buf[0]);
- ASSERT.equal(0xff, buf[1]);
- ASSERT.equal(0x34, buf[2]);
- ASSERT.equal(0x21, buf[3]);
- ASSERT.equal(0x34, buf[4]);
- ASSERT.equal(0xab, buf[5]);
- ASSERT.equal(0xcd, buf[6]);
- ASSERT.equal(0xba, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'big', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0xff, buf[1]);
- ASSERT.equal(0xff, buf[2]);
- ASSERT.equal(0x34, buf[3]);
- ASSERT.equal(0x21, buf[4]);
- ASSERT.equal(0x34, buf[5]);
- ASSERT.equal(0xab, buf[6]);
- ASSERT.equal(0xcd, buf[7]);
- ASSERT.equal(0xba, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'big', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0xff, buf[2]);
- ASSERT.equal(0xff, buf[3]);
- ASSERT.equal(0x34, buf[4]);
- ASSERT.equal(0x21, buf[5]);
- ASSERT.equal(0x34, buf[6]);
- ASSERT.equal(0xab, buf[7]);
- ASSERT.equal(0xcd, buf[8]);
- ASSERT.equal(0xba, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'little', buf, 0);
- ASSERT.equal(0xba, buf[0]);
- ASSERT.equal(0xcd, buf[1]);
- ASSERT.equal(0xab, buf[2]);
- ASSERT.equal(0x34, buf[3]);
- ASSERT.equal(0x21, buf[4]);
- ASSERT.equal(0x34, buf[5]);
- ASSERT.equal(0xff, buf[6]);
- ASSERT.equal(0xff, buf[7]);
- ASSERT.equal(0x66, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'little', buf, 1);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0xba, buf[1]);
- ASSERT.equal(0xcd, buf[2]);
- ASSERT.equal(0xab, buf[3]);
- ASSERT.equal(0x34, buf[4]);
- ASSERT.equal(0x21, buf[5]);
- ASSERT.equal(0x34, buf[6]);
- ASSERT.equal(0xff, buf[7]);
- ASSERT.equal(0xff, buf[8]);
- ASSERT.equal(0x66, buf[9]);
-
- buf.fill(0x66);
- mod_ctype.wuint64(data, 'little', buf, 2);
- ASSERT.equal(0x66, buf[0]);
- ASSERT.equal(0x66, buf[1]);
- ASSERT.equal(0xba, buf[2]);
- ASSERT.equal(0xcd, buf[3]);
- ASSERT.equal(0xab, buf[4]);
- ASSERT.equal(0x34, buf[5]);
- ASSERT.equal(0x21, buf[6]);
- ASSERT.equal(0x34, buf[7]);
- ASSERT.equal(0xff, buf[8]);
- ASSERT.equal(0xff, buf[9]);
-}
-
-/*
- * Make sure we catch invalid writes.
- */
-function testWriteInvalid()
-{
- var data, buf;
-
- /* Buffer too small */
- buf = new Buffer(4);
- data = [ 0, 0];
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'big', buf, 0);
- }, Error, 'buffer too small');
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'little', buf, 0);
- }, Error, 'buffer too small');
-
- /* Beyond the end of the buffer */
- buf = new Buffer(12);
- data = [ 0, 0];
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'little', buf, 11);
- }, Error, 'write beyond end of buffer');
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'big', buf, 11);
- }, Error, 'write beyond end of buffer');
-
- /* Write negative values */
- buf = new Buffer(12);
- data = [ -3, 0 ];
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'big', buf, 1);
- }, Error, 'write negative number');
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'little', buf, 1);
- }, Error, 'write negative number');
-
- data = [ 0, -3 ];
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'big', buf, 1);
- }, Error, 'write negative number');
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'little', buf, 1);
- }, Error, 'write negative number');
-
- data = [ -3, -3 ];
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'big', buf, 1);
- }, Error, 'write negative number');
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'little', buf, 1);
- }, Error, 'write negative number');
-
-
- /* Write fractional values */
- buf = new Buffer(12);
- data = [ 3.33, 0 ];
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'big', buf, 1);
- }, Error, 'write fractions');
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'little', buf, 1);
- }, Error, 'write fractions');
-
- data = [ 0, 3.3 ];
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'big', buf, 1);
- }, Error, 'write fractions');
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'little', buf, 1);
- }, Error, 'write fractions');
-
- data = [ 3.33, 2.42 ];
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'big', buf, 1);
- }, Error, 'write fractions');
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'little', buf, 1);
- }, Error, 'write fractions');
-
- /* Write values that are too large */
- buf = new Buffer(12);
- data = [ 0xffffffffff, 23 ];
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-
- data = [ 0xffffffffff, 0xffffff238 ];
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-
- data = [ 0x23, 0xffffff238 ];
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'big', buf, 1);
- }, Error, 'write too large');
- ASSERT.throws(function () {
- mod_ctype.wuint64(data, 'little', buf, 1);
- }, Error, 'write too large');
-}
-
-
-testRead();
-testReadOver();
-testWriteZero();
-testWrite();
-testWriteInvalid();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js
deleted file mode 100644
index 87ae59b790..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.roundtrip.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * A battery of tests for sucessful round-trip between writes and reads
- */
-
-var mod_ctype = require('../../../ctio.js');
-var ASSERT = require('assert');
-
-
-/*
- * What the heck, let's just test every value for 8-bits.
- */
-
-function test8() {
- var data = new Buffer(1);
- var i;
- for (i = 0; i < 256; i++) {
- mod_ctype.wuint8(i, 'big', data, 0);
- ASSERT.equal(i, mod_ctype.ruint8(data, 'big', 0));
- mod_ctype.wuint8(i, 'little', data, 0);
- ASSERT.equal(i, mod_ctype.ruint8(data, 'little', 0));
- }
- ASSERT.ok(true);
-}
-
-/*
- * Test a random sample of 256 values in the 16-bit unsigned range
- */
-
-function test16() {
- var data = new Buffer(2);
- var i = 0;
- for (i = 0; i < 256; i++) {
- var value = Math.round(Math.random() * Math.pow(2, 16));
- mod_ctype.wuint16(value, 'big', data, 0);
- ASSERT.equal(value, mod_ctype.ruint16(data, 'big', 0));
- mod_ctype.wuint16(value, 'little', data, 0);
- ASSERT.equal(value, mod_ctype.ruint16(data, 'little', 0));
- }
-}
-
-/*
- * Test a random sample of 256 values in the 32-bit unsigned range
- */
-
-function test32() {
- var data = new Buffer(4);
- var i = 0;
- for (i = 0; i < 256; i++) {
- var value = Math.round(Math.random() * Math.pow(2, 32));
- mod_ctype.wuint32(value, 'big', data, 0);
- ASSERT.equal(value, mod_ctype.ruint32(data, 'big', 0));
- mod_ctype.wuint32(value, 'little', data, 0);
- ASSERT.equal(value, mod_ctype.ruint32(data, 'little', 0));
- }
-}
-
-/*
- * Test a random sample of 256 values in the 64-bit unsigned range
- */
-
-function test64() {
- var data = new Buffer(8);
- var i = 0;
- for (i = 0; i < 256; i++) {
- var low = Math.round(Math.random() * Math.pow(2, 32));
- var high = Math.round(Math.random() * Math.pow(2, 32));
- mod_ctype.wuint64([high, low], 'big', data, 0);
- var result = mod_ctype.ruint64(data, 'big', 0);
- ASSERT.equal(high, result[0]);
- ASSERT.equal(low, result[1]);
- mod_ctype.wuint64([high, low], 'little', data, 0);
- result = mod_ctype.ruint64(data, 'little', 0);
- ASSERT.equal(high, result[0]);
- ASSERT.equal(low, result[1]);
- }
-}
-
-exports.test8 = test8;
-exports.test16 = test16;
-exports.test32 = test32;
-exports.test64 = test64;
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js
deleted file mode 100644
index b67c077fe5..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.ruint.js
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * A battery of tests to help us read a series of uints
- */
-
-var mod_ctype = require('../../../ctio.js');
-var ASSERT = require('assert');
-
-/*
- * We need to check the following things:
- * - We are correctly resolving big endian (doesn't mean anything for 8 bit)
- * - Correctly resolving little endian (doesn't mean anything for 8 bit)
- * - Correctly using the offsets
- * - Correctly interpreting values that are beyond the signed range as unsigned
- */
-function test8()
-{
- var data = new Buffer(4);
- data[0] = 23;
- data[1] = 23;
- data[2] = 23;
- data[3] = 23;
- ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 0));
- ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 0));
- ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 1));
- ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 1));
- ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 2));
- ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 2));
- ASSERT.equal(23, mod_ctype.ruint8(data, 'big', 3));
- ASSERT.equal(23, mod_ctype.ruint8(data, 'little', 3));
- data[0] = 255; /* If it became a signed int, would be -1 */
- ASSERT.equal(255, mod_ctype.ruint8(data, 'big', 0));
- ASSERT.equal(255, mod_ctype.ruint8(data, 'little', 0));
-}
-
-/*
- * Test 16 bit unsigned integers. We need to verify the same set as 8 bit, only
- * now some of the issues actually matter:
- * - We are correctly resolving big endian
- * - Correctly resolving little endian
- * - Correctly using the offsets
- * - Correctly interpreting values that are beyond the signed range as unsigned
- */
-function test16()
-{
- var data = new Buffer(4);
- /* Test signed values first */
- data[0] = 0;
- data[1] = 0x23;
- data[2] = 0x42;
- data[3] = 0x3f;
-
- ASSERT.equal(0x23, mod_ctype.ruint16(data, 'big', 0));
- ASSERT.equal(0x2342, mod_ctype.ruint16(data, 'big', 1));
- ASSERT.equal(0x423f, mod_ctype.ruint16(data, 'big', 2));
-
- ASSERT.equal(0x2300, mod_ctype.ruint16(data, 'little', 0));
- ASSERT.equal(0x4223, mod_ctype.ruint16(data, 'little', 1));
- ASSERT.equal(0x3f42, mod_ctype.ruint16(data, 'little', 2));
-
- data[0] = 0xfe;
- data[1] = 0xfe;
-
- ASSERT.equal(0xfefe, mod_ctype.ruint16(data, 'big', 0));
- ASSERT.equal(0xfefe, mod_ctype.ruint16(data, 'little', 0));
-}
-
-/*
- * Test 32 bit unsigned integers. We need to verify the same set as 8 bit, only
- * now some of the issues actually matter:
- * - We are correctly resolving big endian
- * - Correctly using the offsets
- * - Correctly interpreting values that are beyond the signed range as unsigned
- */
-function test32()
-{
- var data = new Buffer(8);
- data[0] = 0x32;
- data[1] = 0x65;
- data[2] = 0x42;
- data[3] = 0x56;
- data[4] = 0x23;
- data[5] = 0xff;
-
- ASSERT.equal(0x32654256, mod_ctype.ruint32(data, 'big', 0));
- ASSERT.equal(0x65425623, mod_ctype.ruint32(data, 'big', 1));
- ASSERT.equal(0x425623ff, mod_ctype.ruint32(data, 'big', 2));
-
- ASSERT.equal(0x56426532, mod_ctype.ruint32(data, 'little', 0));
- ASSERT.equal(0x23564265, mod_ctype.ruint32(data, 'little', 1));
- ASSERT.equal(0xff235642, mod_ctype.ruint32(data, 'little', 2));
-}
-
-test8();
-test16();
-test32();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js
deleted file mode 100644
index d6c4230f02..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctio/uint/tst.wuint.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * A battery of tests to help us read a series of uints
- */
-
-var mod_ctype = require('../../../ctio.js');
-var ASSERT = require('assert');
-
-/*
- * We need to check the following things:
- * - We are correctly resolving big endian (doesn't mean anything for 8 bit)
- * - Correctly resolving little endian (doesn't mean anything for 8 bit)
- * - Correctly using the offsets
- * - Correctly interpreting values that are beyond the signed range as unsigned
- */
-function test8()
-{
- var data = new Buffer(4);
- mod_ctype.wuint8(23, 'big', data, 0);
- mod_ctype.wuint8(23, 'big', data, 1);
- mod_ctype.wuint8(23, 'big', data, 2);
- mod_ctype.wuint8(23, 'big', data, 3);
- ASSERT.equal(23, data[0]);
- ASSERT.equal(23, data[1]);
- ASSERT.equal(23, data[2]);
- ASSERT.equal(23, data[3]);
- mod_ctype.wuint8(23, 'little', data, 0);
- mod_ctype.wuint8(23, 'little', data, 1);
- mod_ctype.wuint8(23, 'little', data, 2);
- mod_ctype.wuint8(23, 'little', data, 3);
- ASSERT.equal(23, data[0]);
- ASSERT.equal(23, data[1]);
- ASSERT.equal(23, data[2]);
- ASSERT.equal(23, data[3]);
- mod_ctype.wuint8(255, 'big', data, 0);
- ASSERT.equal(255, data[0]);
- mod_ctype.wuint8(255, 'little', data, 0);
- ASSERT.equal(255, data[0]);
-}
-
-function test16()
-{
- var value = 0x2343;
- var data = new Buffer(4);
- mod_ctype.wuint16(value, 'big', data, 0);
- ASSERT.equal(0x23, data[0]);
- ASSERT.equal(0x43, data[1]);
- mod_ctype.wuint16(value, 'big', data, 1);
- ASSERT.equal(0x23, data[1]);
- ASSERT.equal(0x43, data[2]);
- mod_ctype.wuint16(value, 'big', data, 2);
- ASSERT.equal(0x23, data[2]);
- ASSERT.equal(0x43, data[3]);
-
- mod_ctype.wuint16(value, 'little', data, 0);
- ASSERT.equal(0x23, data[1]);
- ASSERT.equal(0x43, data[0]);
-
- mod_ctype.wuint16(value, 'little', data, 1);
- ASSERT.equal(0x23, data[2]);
- ASSERT.equal(0x43, data[1]);
-
- mod_ctype.wuint16(value, 'little', data, 2);
- ASSERT.equal(0x23, data[3]);
- ASSERT.equal(0x43, data[2]);
-
- value = 0xff80;
- mod_ctype.wuint16(value, 'little', data, 0);
- ASSERT.equal(0xff, data[1]);
- ASSERT.equal(0x80, data[0]);
-
- mod_ctype.wuint16(value, 'big', data, 0);
- ASSERT.equal(0xff, data[0]);
- ASSERT.equal(0x80, data[1]);
-}
-
-function test32()
-{
- var data = new Buffer(6);
- var value = 0xe7f90a6d;
-
- mod_ctype.wuint32(value, 'big', data, 0);
- ASSERT.equal(0xe7, data[0]);
- ASSERT.equal(0xf9, data[1]);
- ASSERT.equal(0x0a, data[2]);
- ASSERT.equal(0x6d, data[3]);
-
- mod_ctype.wuint32(value, 'big', data, 1);
- ASSERT.equal(0xe7, data[1]);
- ASSERT.equal(0xf9, data[2]);
- ASSERT.equal(0x0a, data[3]);
- ASSERT.equal(0x6d, data[4]);
-
- mod_ctype.wuint32(value, 'big', data, 2);
- ASSERT.equal(0xe7, data[2]);
- ASSERT.equal(0xf9, data[3]);
- ASSERT.equal(0x0a, data[4]);
- ASSERT.equal(0x6d, data[5]);
-
- mod_ctype.wuint32(value, 'little', data, 0);
- ASSERT.equal(0xe7, data[3]);
- ASSERT.equal(0xf9, data[2]);
- ASSERT.equal(0x0a, data[1]);
- ASSERT.equal(0x6d, data[0]);
-
- mod_ctype.wuint32(value, 'little', data, 1);
- ASSERT.equal(0xe7, data[4]);
- ASSERT.equal(0xf9, data[3]);
- ASSERT.equal(0x0a, data[2]);
- ASSERT.equal(0x6d, data[1]);
-
- mod_ctype.wuint32(value, 'little', data, 2);
- ASSERT.equal(0xe7, data[5]);
- ASSERT.equal(0xf9, data[4]);
- ASSERT.equal(0x0a, data[3]);
- ASSERT.equal(0x6d, data[2]);
-}
-
-function test64()
-{
- var data = new Buffer(10);
- var value = 0x0007cda8e7f90a6d;
- var high = Math.floor(value / Math.pow(2, 32));
- var low = value - (high * Math.pow(2, 32));
- ASSERT.equal(0x0007cda8, high);
- ASSERT.equal(0xe7f90a6d, low);
-
- mod_ctype.wuint64([high, low], 'big', data, 0);
- ASSERT.equal(0x00, data[0]);
- ASSERT.equal(0x07, data[1]);
- ASSERT.equal(0xcd, data[2]);
- ASSERT.equal(0xa8, data[3]);
- ASSERT.equal(0xe7, data[4]);
- ASSERT.equal(0xf9, data[5]);
- ASSERT.equal(0x0a, data[6]);
- ASSERT.equal(0x6d, data[7]);
-
- mod_ctype.wuint64([high, low], 'little', data, 0);
- ASSERT.equal(0x6d, data[0]);
- ASSERT.equal(0x0a, data[1]);
- ASSERT.equal(0xf9, data[2]);
- ASSERT.equal(0xe7, data[3]);
- ASSERT.equal(0xa8, data[4]);
- ASSERT.equal(0xcd, data[5]);
- ASSERT.equal(0x07, data[6]);
- ASSERT.equal(0x00, data[7]);
-}
-
-test8();
-test16();
-test32();
-test64();
-
-exports.test8 = test8;
-exports.test16 = test16;
-exports.test32 = test32;
-exports.test64 = test64;
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js
deleted file mode 100644
index e9895152d0..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicr.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Simple does to see if it works at all
- */
-var mod_ctype = require('../../ctype');
-var ASSERT = require('assert');
-var mod_sys = require('sys');
-
-function test()
-{
- var ii, p, result, buffer;
-
- p = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer(4);
- buffer[0] = 23;
- buffer[3] = 42;
- result = p.readData([ { x: { type: 'uint8_t' }},
- { y: { type: 'uint8_t', offset: 3 }}
- ], buffer, 0);
- ASSERT.equal(23, result['x']);
- ASSERT.equal(42, result['y']);
-
- buffer = new Buffer(23);
- for (ii = 0; ii < 23; ii++)
- buffer[ii] = 0;
-
- buffer.write('Hello, world!');
- result = p.readData([ { x: { type: 'char[20]' }} ], buffer, 0);
-
- /*
- * This is currently broken behvaior, need to redesign check
- * ASSERT.equal('Hello, world!', result['x'].toString('utf-8', 0,
- * result['x'].length));
- */
-
- buffer = new Buffer(4);
- buffer[0] = 0x03;
- buffer[1] = 0x24;
- buffer[2] = 0x25;
- buffer[3] = 0x26;
- result = p.readData([ { y: { type: 'uint8_t' }},
- { x: { type: 'uint8_t[y]' }}], buffer, 0);
- console.log(mod_sys.inspect(result, true));
-
- p.typedef('ssize_t', 'int32_t');
- ASSERT.deepEqual({ 'ssize_t': 'int32_t' }, p.lstypes());
- result = p.readData([ { x: { type: 'ssize_t' } } ], buffer, 0);
- ASSERT.equal(0x26252403, result['x']);
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js
deleted file mode 100644
index 89d446f291..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.basicw.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Simple does it fucking work at all test
- */
-
-var mod_ctype = require('../../ctype');
-var ASSERT = require('assert');
-var mod_sys = require('sys');
-
-function test()
-{
- var ii, p, buffer, buf2;
-
- p = new mod_ctype.Parser({ endian: 'big' });
- buffer = new Buffer(4);
- p.writeData([ { x: { type: 'uint8_t', value: 23 }},
- { y: { type: 'uint8_t', offset: 3, value: 42 }}
- ], buffer, 0);
- ASSERT.equal(23, buffer[0]);
- ASSERT.equal(42, buffer[3]);
-
- buffer = new Buffer(20);
- for (ii = 0; ii < 20; ii++)
- buffer[ii] = 0;
-
- buffer.write('Hello, world!');
- buf2 = new Buffer(22);
- p.writeData([ { x: { type: 'char[20]', value: buffer }} ], buf2, 0);
- for (ii = 0; ii < 20; ii++)
- ASSERT.equal(buffer[ii], buf2[ii]);
- /*
- * This is currently broken behvaior, need to redesign check
- * ASSERT.equal('Hello, world!', result['x'].toString('utf-8', 0,
- * result['x'].length));
- */
-
- buffer = new Buffer(4);
- p.writeData([ { y: { type: 'uint8_t', value: 3 }},
- { x: { type: 'uint8_t[y]', value: [ 0x24, 0x25, 0x26] }}],
- buffer, 0);
- console.log(mod_sys.inspect(buffer));
-
- p.typedef('ssize_t', 'int32_t');
- ASSERT.deepEqual({ 'ssize_t': 'int32_t' }, p.lstypes());
-}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js
deleted file mode 100644
index 14d9529c30..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.char.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Test the different forms of reading characters:
- *
- * - the default, a single element buffer
- * - uint8, values are uint8_ts
- * - int8, values are int8_ts
- */
-var mod_ctype = require('../../ctype');
-var mod_assert = require('assert');
-
-function test()
-{
- var p, buf, res;
-
- buf = new Buffer(1);
- buf[0] = 255;
-
- p = new mod_ctype.Parser({ endian: 'little'});
- res = p.readData([ { c: { type: 'char' }} ], buf, 0);
- res = res['c'];
- mod_assert.ok(res instanceof Buffer);
- mod_assert.equal(255, res[0]);
-
- p = new mod_ctype.Parser({ endian: 'little',
- 'char-type': 'int8' });
- res = p.readData([ { c: { type: 'char' }} ], buf, 0);
- res = res['c'];
- mod_assert.ok(typeof (res) == 'number', 'got typeof (res): ' +
- typeof (res));
- mod_assert.equal(-1, res);
-
- p = new mod_ctype.Parser({ endian: 'little',
- 'char-type': 'uint8' });
- res = p.readData([ { c: { type: 'char' }} ], buf, 0);
- res = res['c'];
- mod_assert.ok(typeof (res) == 'number', 'got typeof (res): ' +
- typeof (res));
- mod_assert.equal(255, res);
-
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js
deleted file mode 100644
index 11fc2d2ced..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.endian.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Simple test to make sure that the endian setting works.
- */
-
-var mod_ctype = require('../../ctype.js');
-var mod_assert = require('assert');
-
-function test()
-{
- var parser, buf;
-
- parser = new mod_ctype.Parser({
- endian: 'little'
- });
-
- buf = new Buffer(2);
- parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]);
- mod_assert.equal(buf[0], 0x34);
- mod_assert.equal(buf[1], 0x12);
- parser.setEndian('big');
-
- parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]);
- mod_assert.equal(buf[0], 0x12);
- mod_assert.equal(buf[1], 0x34);
-
- parser.setEndian('little');
- parser.writeData([ { key: { type: 'uint16_t' } } ], buf, 0, [ 0x1234 ]);
- mod_assert.equal(buf[0], 0x34);
- mod_assert.equal(buf[1], 0x12);
-}
-
-function fail()
-{
- var parser;
-
- parser = new mod_ctype.Parser({
- endian: 'little'
- });
- mod_assert.throws(function () {
- parser.setEndian('littlebigwrong');
- });
-}
-
-test();
-fail();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js
deleted file mode 100644
index 9491cf6e13..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.oldwrite.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * A long overdue test to go through and verify that we can read and write
- * structures as well as nested structures.
- */
-
-var mod_ctype = require('../../ctype.js');
-var mod_assert = require('assert');
-
-function test()
-{
- var parser, buf, data;
- parser = new mod_ctype.Parser({
- endian: 'little'
- });
- parser.typedef('point_t', [
- { x: { type: 'uint8_t' } },
- { y: { type: 'uint8_t' } }
- ]);
- buf = new Buffer(2);
- data = [
- { point: { type: 'point_t', value: [ 23, 42 ] } }
- ];
- parser.writeData(data, buf, 0);
- mod_assert.ok(buf[0] == 23);
- mod_assert.ok(buf[1] == 42);
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js
deleted file mode 100644
index 6c490a2e01..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.readSize.js
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Testing to ensure we're reading the expected number bytes
- */
-var mod_ctype = require('../../ctype');
-var ASSERT = require('assert');
-
-function testUint8()
-{
- var parser, result, buffer;
- parser = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer('80', 'hex');
- result = parser.readStruct([ { item: { type: 'uint8_t' } } ], buffer,
- 0);
- ASSERT.equal(result['size'], 1);
-}
-
-function testSint8()
-{
- var parser, result, buffer;
- parser = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer('80', 'hex');
- result = parser.readStruct([ { item: { type: 'int8_t' } } ], buffer, 0);
- ASSERT.equal(result['size'], 1);
-}
-
-function testUint16()
-{
- var parser, result, buffer;
- parser = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer('8000', 'hex');
- result = parser.readStruct([ { item: { type: 'uint16_t' } } ], buffer,
- 0);
- ASSERT.equal(result['size'], 2);
-}
-
-function testSint16()
-{
- var parser, result, buffer;
- parser = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer('8000', 'hex');
- result = parser.readStruct([ { item: { type: 'int16_t' } } ], buffer,
- 0);
- ASSERT.equal(result['size'], 2);
-}
-
-function testUint32()
-{
- var parser, result, buffer;
- parser = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer('80000000', 'hex');
- result = parser.readStruct([ { item: { type: 'uint32_t' } } ], buffer,
- 0);
- ASSERT.equal(result['size'], 4);
-}
-
-function testSint32()
-{
- var parser, result, buffer;
- parser = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer('80000000', 'hex');
- result = parser.readStruct([ { item: { type: 'int32_t' } } ], buffer,
- 0);
- ASSERT.equal(result['size'], 4);
-}
-
-function testUint64()
-{
- var parser, result, buffer;
- parser = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer('8000000000000000', 'hex');
- result = parser.readStruct([ { item: { type: 'uint64_t' } } ], buffer,
- 0);
- ASSERT.equal(result['size'], 8);
-}
-
-function testSint64()
-{
- var parser, result, buffer;
- parser = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer('8000000000000000', 'hex');
- result = parser.readStruct([ { item: { type: 'int64_t' } } ], buffer,
- 0);
- ASSERT.equal(result['size'], 8);
-}
-
-function testFloat()
-{
- var parser, result, buffer;
- parser = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer('ABAAAA3E', 'hex');
- result = parser.readStruct([ { item: { type: 'float' } } ], buffer, 0);
- ASSERT.equal(result['size'], 4);
-}
-
-function testDouble()
-{
- var parser, result, buffer;
- parser = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer('000000000000F03F', 'hex');
- result = parser.readStruct([ { item: { type: 'double' } } ], buffer, 0);
- ASSERT.equal(result['size'], 8);
-}
-
-function testChar()
-{
- var parser, result, buffer;
- parser = new mod_ctype.Parser({ endian: 'little' });
- buffer = new Buffer('t');
- result = parser.readStruct([ { item: { type: 'char' } } ], buffer, 0);
- ASSERT.equal(result['size'], 1);
-}
-
-function test()
-{
- testSint8();
- testUint8();
- testSint16();
- testUint16();
- testSint32();
- testUint32();
- testSint64();
- testUint64();
- testFloat();
- testDouble();
- testChar();
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js
deleted file mode 100644
index 09c1a5ba2d..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.structw.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * A long overdue test to go through and verify that we can read and write
- * structures as well as nested structures.
- */
-
-var mod_ctype = require('../../ctype.js');
-var mod_assert = require('assert');
-
-function test()
-{
- var parser, buf, data;
- parser = new mod_ctype.Parser({
- endian: 'little'
- });
- parser.typedef('point_t', [
- { x: { type: 'uint8_t' } },
- { y: { type: 'uint8_t' } }
- ]);
- buf = new Buffer(2);
- data = [
- { point: { type: 'point_t' } }
- ];
- parser.writeData(data, buf, 0, [ [ 23, 42 ] ]);
- mod_assert.ok(buf[0] == 23);
- mod_assert.ok(buf[1] == 42);
-}
-
-test();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js
deleted file mode 100644
index 485566670b..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/ctype/tst/ctype/tst.writeStruct.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Test to verify that the offset is incremented when structures are written to.
- * Hopefully we will not regress issue #41
- */
-
-var mod_ctype = require('../../ctype.js');
-var mod_assert = require('assert');
-
-function test()
-{
- var parser, buf, data;
- parser = new mod_ctype.Parser({
- endian: 'little'
- });
- parser.typedef('point_t', [
- { x: { type: 'uint8_t' } },
- { y: { type: 'uint8_t' } }
- ]);
- buf = new Buffer(4);
- data = [
- { point1: { type: 'point_t' } },
- { point2: { type: 'point_t' } }
- ];
- parser.writeData(data, buf, 0, [ [ 23, 42 ], [ 91, 18 ] ]);
- mod_assert.ok(buf[0] == 23);
- mod_assert.ok(buf[1] == 42);
- mod_assert.ok(buf[2] == 91);
- mod_assert.ok(buf[3] == 18);
-}
-
-test();
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 c6bfef9750..2dd58f537f 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
@@ -1,54 +1,72 @@
{
+ "name": "http-signature",
+ "description": "Reference implementation of Joyent's HTTP Signature scheme.",
+ "version": "0.10.1",
+ "license": "MIT",
"author": {
"name": "Joyent, Inc"
},
- "name": "http-signature",
- "description": "Reference implementation of Joyent's HTTP Signature Scheme",
- "version": "0.10.0",
+ "contributors": [
+ {
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
+ },
+ {
+ "name": "David I. Lehn",
+ "email": "dil@lehn.org"
+ }
+ ],
"repository": {
"type": "git",
"url": "git://github.com/joyent/node-http-signature.git"
},
+ "homepage": "https://github.com/joyent/node-http-signature/",
+ "bugs": {
+ "url": "https://github.com/joyent/node-http-signature/issues"
+ },
+ "keywords": [
+ "https",
+ "request"
+ ],
"engines": {
"node": ">=0.8"
},
"main": "lib/index.js",
"scripts": {
- "test": "tap tst/*.js"
+ "test": "tap test/*.js"
},
"dependencies": {
- "assert-plus": "0.1.2",
+ "assert-plus": "^0.1.5",
"asn1": "0.1.11",
- "ctype": "0.5.2"
+ "ctype": "0.5.3"
},
"devDependencies": {
- "node-uuid": "1.4.0",
+ "node-uuid": "^1.4.1",
"tap": "0.4.2"
},
- "readme": "# node-http-signature\n\nnode-http-signature is a node.js library that has client and server components\nfor Joyent's [HTTP Signature Scheme](http_signing.md).\n\n## Usage\n\nNote the example below signs a request with the same key/cert used to start an\nHTTP server. This is almost certainly not what you actaully want, but is just\nused to illustrate the API calls; you will need to provide your own key\nmanagement in addition to this library.\n\n### Client\n\n var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var key = fs.readFileSync('./key.pem', 'ascii');\n\n var options = {\n host: 'localhost',\n port: 8443,\n path: '/',\n method: 'GET',\n headers: {}\n };\n\n // Adds a 'Date' header in, signs it, and adds the\n // 'Authorization' header in.\n var req = https.request(options, function(res) {\n console.log(res.statusCode);\n });\n\n\n httpSignature.sign(req, {\n key: key,\n keyId: './cert.pem'\n });\n\n req.end();\n\n### Server\n\n var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var options = {\n key: fs.readFileSync('./key.pem'),\n cert: fs.readFileSync('./cert.pem')\n };\n\n https.createServer(options, function (req, res) {\n var rc = 200;\n var parsed = httpSignature.parseRequest(req);\n var pub = fs.readFileSync(parsed.keyId, 'ascii');\n if (!httpSignature.verifySignature(parsed, pub))\n rc = 401;\n\n res.writeHead(rc);\n res.end();\n }).listen(8443);\n\n## Installation\n\n npm install http-signature\n\n## License\n\nMIT.\n\n## Bugs\n\nSee <https://github.com/joyent/node-http-signature/issues>.\n",
- "readmeFilename": "README.md",
- "_id": "http-signature@0.10.0",
- "dist": {
- "shasum": "1494e4f5000a83c0f11bcc12d6007c530cb99582",
- "tarball": "http://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz"
- },
+ "_id": "http-signature@0.10.1",
+ "_shasum": "4fbdac132559aa8323121e540779c0a012b27e66",
+ "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
"_from": "http-signature@>=0.10.0 <0.11.0",
- "_npmVersion": "1.2.18",
+ "_npmVersion": "1.4.28",
"_npmUser": {
- "name": "mcavage",
- "email": "mcavage@gmail.com"
+ "name": "pfmooney",
+ "email": "patrick.f.mooney@gmail.com"
},
"maintainers": [
{
"name": "mcavage",
"email": "mcavage@gmail.com"
+ },
+ {
+ "name": "pfmooney",
+ "email": "patrick.f.mooney@gmail.com"
}
],
- "directories": {},
- "_shasum": "1494e4f5000a83c0f11bcc12d6007c530cb99582",
- "_resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.0.tgz",
- "bugs": {
- "url": "https://github.com/joyent/node-http-signature/issues"
+ "dist": {
+ "shasum": "4fbdac132559aa8323121e540779c0a012b27e66",
+ "tarball": "http://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz"
},
- "homepage": "https://github.com/joyent/node-http-signature"
+ "directories": {},
+ "readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/isstream/.jshintrc b/deps/npm/node_modules/request/node_modules/isstream/.jshintrc
new file mode 100644
index 0000000000..c8ef3ca409
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/isstream/.jshintrc
@@ -0,0 +1,59 @@
+{
+ "predef": [ ]
+ , "bitwise": false
+ , "camelcase": false
+ , "curly": false
+ , "eqeqeq": false
+ , "forin": false
+ , "immed": false
+ , "latedef": false
+ , "noarg": true
+ , "noempty": true
+ , "nonew": true
+ , "plusplus": false
+ , "quotmark": true
+ , "regexp": false
+ , "undef": true
+ , "unused": true
+ , "strict": false
+ , "trailing": true
+ , "maxlen": 120
+ , "asi": true
+ , "boss": true
+ , "debug": true
+ , "eqnull": true
+ , "esnext": true
+ , "evil": true
+ , "expr": true
+ , "funcscope": false
+ , "globalstrict": false
+ , "iterator": false
+ , "lastsemic": true
+ , "laxbreak": true
+ , "laxcomma": true
+ , "loopfunc": true
+ , "multistr": false
+ , "onecase": false
+ , "proto": false
+ , "regexdash": false
+ , "scripturl": true
+ , "smarttabs": false
+ , "shadow": false
+ , "sub": true
+ , "supernew": false
+ , "validthis": true
+ , "browser": true
+ , "couch": false
+ , "devel": false
+ , "dojo": false
+ , "mootools": false
+ , "node": true
+ , "nonstandard": true
+ , "prototypejs": false
+ , "rhino": false
+ , "worker": true
+ , "wsh": false
+ , "nomen": false
+ , "onevar": false
+ , "passfail": false
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/isstream/.npmignore b/deps/npm/node_modules/request/node_modules/isstream/.npmignore
new file mode 100644
index 0000000000..aa1ec1ea06
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/isstream/.npmignore
@@ -0,0 +1 @@
+*.tgz
diff --git a/deps/npm/node_modules/request/node_modules/isstream/.travis.yml b/deps/npm/node_modules/request/node_modules/isstream/.travis.yml
new file mode 100644
index 0000000000..1fec2ab9af
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/isstream/.travis.yml
@@ -0,0 +1,12 @@
+language: node_js
+node_js:
+ - "0.8"
+ - "0.10"
+ - "0.11"
+branches:
+ only:
+ - master
+notifications:
+ email:
+ - rod@vagg.org
+script: npm test
diff --git a/deps/npm/node_modules/request/node_modules/isstream/LICENSE b/deps/npm/node_modules/request/node_modules/isstream/LICENSE
new file mode 100644
index 0000000000..e7554b50ca
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/isstream/LICENSE
@@ -0,0 +1,39 @@
+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/README.md b/deps/npm/node_modules/request/node_modules/isstream/README.md
new file mode 100644
index 0000000000..e60fc8acf3
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/isstream/README.md
@@ -0,0 +1,66 @@
+# isStream
+
+[![Build Status](https://secure.travis-ci.org/rvagg/isstream.png)](http://travis-ci.org/rvagg/isstream)
+
+**Test if an object is a `Stream`**
+
+[![NPM](https://nodei.co/npm/isstream.svg)](https://nodei.co/npm/isstream/)
+
+The missing `Stream.isStream(obj)`: determine if an object is standard Node.js `Stream`. Works for Node-core `Stream` objects (for 0.8, 0.10, 0.11, and in theory, older and newer versions) and all versions of **[readable-stream](https://github.com/isaacs/readable-stream)**.
+
+## Usage:
+
+```js
+var isStream = require('isstream')
+var Stream = require('stream')
+
+isStream(new Stream()) // true
+
+isStream({}) // false
+
+isStream(new Stream.Readable()) // true
+isStream(new Stream.Writable()) // true
+isStream(new Stream.Duplex()) // true
+isStream(new Stream.Transform()) // true
+isStream(new Stream.PassThrough()) // true
+```
+
+## But wait! There's more!
+
+You can also test for `isReadable(obj)`, `isWritable(obj)` and `isDuplex(obj)` to test for implementations of Streams2 (and Streams3) base classes.
+
+```js
+var isReadable = require('isstream').isReadable
+var isWritable = require('isstream').isWritable
+var isDuplex = require('isstream').isDuplex
+var Stream = require('stream')
+
+isReadable(new Stream()) // false
+isWritable(new Stream()) // false
+isDuplex(new Stream()) // false
+
+isReadable(new Stream.Readable()) // true
+isReadable(new Stream.Writable()) // false
+isReadable(new Stream.Duplex()) // true
+isReadable(new Stream.Transform()) // true
+isReadable(new Stream.PassThrough()) // true
+
+isWritable(new Stream.Readable()) // false
+isWritable(new Stream.Writable()) // true
+isWritable(new Stream.Duplex()) // true
+isWritable(new Stream.Transform()) // true
+isWritable(new Stream.PassThrough()) // true
+
+isDuplex(new Stream.Readable()) // false
+isDuplex(new Stream.Writable()) // false
+isDuplex(new Stream.Duplex()) // true
+isDuplex(new Stream.Transform()) // true
+isDuplex(new Stream.PassThrough()) // true
+```
+
+*Reminder: when implementing your own streams, please [use **readable-stream** rather than core streams](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).*
+
+
+## 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.
diff --git a/deps/npm/node_modules/request/node_modules/isstream/isstream.js b/deps/npm/node_modules/request/node_modules/isstream/isstream.js
new file mode 100644
index 0000000000..a1d104a7ac
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/isstream/isstream.js
@@ -0,0 +1,27 @@
+var stream = require('stream')
+
+
+function isStream (obj) {
+ return obj instanceof stream.Stream
+}
+
+
+function isReadable (obj) {
+ return isStream(obj) && typeof obj._read == 'function' && typeof obj._readableState == 'object'
+}
+
+
+function isWritable (obj) {
+ return isStream(obj) && typeof obj._write == 'function' && typeof obj._writableState == 'object'
+}
+
+
+function isDuplex (obj) {
+ return isReadable(obj) && isWritable(obj)
+}
+
+
+module.exports = isStream
+module.exports.isReadable = isReadable
+module.exports.isWritable = isWritable
+module.exports.isDuplex = isDuplex
diff --git a/deps/npm/node_modules/request/node_modules/isstream/package.json b/deps/npm/node_modules/request/node_modules/isstream/package.json
new file mode 100644
index 0000000000..c3c796d773
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/isstream/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "isstream",
+ "version": "0.1.1",
+ "description": "Determine if an object is a Stream",
+ "main": "isstream.js",
+ "scripts": {
+ "test": "tar --xform 's/^package/readable-stream-1.0/' -zxf readable-stream-1.0.*.tgz && tar --xform 's/^package/readable-stream-1.1/' -zxf readable-stream-1.1.*.tgz && node test.js; rm -rf readable-stream-1.?/"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/rvagg/isstream.git"
+ },
+ "keywords": [
+ "stream",
+ "type",
+ "streams",
+ "readable-stream",
+ "hippo"
+ ],
+ "devDependencies": {
+ "tape": "~2.12.3",
+ "core-util-is": "~1.0.0",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x",
+ "inherits": "~2.0.1"
+ },
+ "author": {
+ "name": "Rod Vagg",
+ "email": "rod@vagg.org"
+ },
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/rvagg/isstream/issues"
+ },
+ "homepage": "https://github.com/rvagg/isstream",
+ "gitHead": "0406cfe2677231b7b23a229a61b15999bf60ce67",
+ "_id": "isstream@0.1.1",
+ "_shasum": "48332c5999893996ba253c81c7bd6e7ae0905c4f",
+ "_from": "isstream@>=0.1.1 <0.2.0",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ },
+ "maintainers": [
+ {
+ "name": "rvagg",
+ "email": "rod@vagg.org"
+ }
+ ],
+ "dist": {
+ "shasum": "48332c5999893996ba253c81c7bd6e7ae0905c4f",
+ "tarball": "http://registry.npmjs.org/isstream/-/isstream-0.1.1.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.1.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/deps/npm/node_modules/request/node_modules/isstream/test.js b/deps/npm/node_modules/request/node_modules/isstream/test.js
new file mode 100644
index 0000000000..8c950c55e6
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/isstream/test.js
@@ -0,0 +1,168 @@
+var tape = require('tape')
+ , EE = require('events').EventEmitter
+ , util = require('util')
+
+
+ , isStream = require('./')
+ , isReadable = require('./').isReadable
+ , isWritable = require('./').isWritable
+ , isDuplex = require('./').isDuplex
+
+ , CoreStreams = require('stream')
+ , ReadableStream10 = require('./readable-stream-1.0/')
+ , ReadableStream11 = require('./readable-stream-1.1/')
+
+
+function test (pass, type, stream) {
+ tape('isStream(' + type + ')', function (t) {
+ t.plan(1)
+ t.ok(pass === isStream(stream), type)
+ })
+}
+
+
+function testReadable (pass, type, stream) {
+ tape('isReadable(' + type + ')', function (t) {
+ t.plan(1)
+ t.ok(pass === isReadable(stream), type)
+ })
+}
+
+
+function testWritable (pass, type, stream) {
+ tape('isWritable(' + type + ')', function (t) {
+ t.plan(1)
+ t.ok(pass === isWritable(stream), type)
+ })
+}
+
+
+function testDuplex (pass, type, stream) {
+ tape('isDuplex(' + type + ')', function (t) {
+ t.plan(1)
+ t.ok(pass === isDuplex(stream), type)
+ })
+}
+
+
+[ undefined, null, '', true, false, 0, 1, 1.0, 'string', {}, function foo () {} ].forEach(function (o) {
+ test(false, 'non-stream / primitive: ' + (JSON.stringify(o) || (o && o.toString()) || o), o)
+})
+
+
+test(false, 'fake stream obj', { pipe: function () {} })
+
+
+;(function () {
+
+ // looks like a stream!
+
+ function Stream () {
+ EE.call(this)
+ }
+ util.inherits(Stream, EE)
+ Stream.prototype.pipe = function () {}
+ Stream.Stream = Stream
+
+ test(false, 'fake stream "new Stream()"', new Stream())
+
+}())
+
+
+test(true, 'CoreStreams.Stream', new (CoreStreams.Stream)())
+test(true, 'CoreStreams.Readable', new (CoreStreams.Readable)())
+test(true, 'CoreStreams.Writable', new (CoreStreams.Writable)())
+test(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)())
+test(true, 'CoreStreams.Transform', new (CoreStreams.Transform)())
+test(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)())
+
+test(true, 'ReadableStream10.Readable', new (ReadableStream10.Readable)())
+test(true, 'ReadableStream10.Writable', new (ReadableStream10.Writable)())
+test(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)())
+test(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)())
+test(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)())
+
+test(true, 'ReadableStream11.Readable', new (ReadableStream11.Readable)())
+test(true, 'ReadableStream11.Writable', new (ReadableStream11.Writable)())
+test(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)())
+test(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)())
+test(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)())
+
+
+testReadable(false, 'CoreStreams.Stream', new (CoreStreams.Stream)())
+testReadable(true, 'CoreStreams.Readable', new (CoreStreams.Readable)())
+testReadable(false, 'CoreStreams.Writable', new (CoreStreams.Writable)())
+testReadable(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)())
+testReadable(true, 'CoreStreams.Transform', new (CoreStreams.Transform)())
+testReadable(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)())
+
+testReadable(true, 'ReadableStream10.Readable', new (ReadableStream10.Readable)())
+testReadable(false, 'ReadableStream10.Writable', new (ReadableStream10.Writable)())
+testReadable(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)())
+testReadable(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)())
+testReadable(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)())
+
+testReadable(true, 'ReadableStream11.Readable', new (ReadableStream11.Readable)())
+testReadable(false, 'ReadableStream11.Writable', new (ReadableStream11.Writable)())
+testReadable(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)())
+testReadable(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)())
+testReadable(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)())
+
+
+testWritable(false, 'CoreStreams.Stream', new (CoreStreams.Stream)())
+testWritable(false, 'CoreStreams.Readable', new (CoreStreams.Readable)())
+testWritable(true, 'CoreStreams.Writable', new (CoreStreams.Writable)())
+testWritable(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)())
+testWritable(true, 'CoreStreams.Transform', new (CoreStreams.Transform)())
+testWritable(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)())
+
+testWritable(false, 'ReadableStream10.Readable', new (ReadableStream10.Readable)())
+testWritable(true, 'ReadableStream10.Writable', new (ReadableStream10.Writable)())
+testWritable(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)())
+testWritable(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)())
+testWritable(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)())
+
+testWritable(false, 'ReadableStream11.Readable', new (ReadableStream11.Readable)())
+testWritable(true, 'ReadableStream11.Writable', new (ReadableStream11.Writable)())
+testWritable(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)())
+testWritable(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)())
+testWritable(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)())
+
+
+testDuplex(false, 'CoreStreams.Stream', new (CoreStreams.Stream)())
+testDuplex(false, 'CoreStreams.Readable', new (CoreStreams.Readable)())
+testDuplex(false, 'CoreStreams.Writable', new (CoreStreams.Writable)())
+testDuplex(true, 'CoreStreams.Duplex', new (CoreStreams.Duplex)())
+testDuplex(true, 'CoreStreams.Transform', new (CoreStreams.Transform)())
+testDuplex(true, 'CoreStreams.PassThrough', new (CoreStreams.PassThrough)())
+
+testDuplex(false, 'ReadableStream10.Readable', new (ReadableStream10.Readable)())
+testDuplex(false, 'ReadableStream10.Writable', new (ReadableStream10.Writable)())
+testDuplex(true, 'ReadableStream10.Duplex', new (ReadableStream10.Duplex)())
+testDuplex(true, 'ReadableStream10.Transform', new (ReadableStream10.Transform)())
+testDuplex(true, 'ReadableStream10.PassThrough', new (ReadableStream10.PassThrough)())
+
+testDuplex(false, 'ReadableStream11.Readable', new (ReadableStream11.Readable)())
+testDuplex(false, 'ReadableStream11.Writable', new (ReadableStream11.Writable)())
+testDuplex(true, 'ReadableStream11.Duplex', new (ReadableStream11.Duplex)())
+testDuplex(true, 'ReadableStream11.Transform', new (ReadableStream11.Transform)())
+testDuplex(true, 'ReadableStream11.PassThrough', new (ReadableStream11.PassThrough)())
+
+
+;[ CoreStreams, ReadableStream10, ReadableStream11 ].forEach(function (p) {
+ [ 'Stream', 'Readable', 'Writable', 'Duplex', 'Transform', 'PassThrough' ].forEach(function (k) {
+ if (!p[k])
+ return
+
+ function SubStream () {
+ p[k].call(this)
+ }
+ util.inherits(SubStream, p[k])
+
+ test(true, 'Stream subclass: ' + p.name + '.' + k, new SubStream())
+
+ })
+})
+
+
+
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/.npmignore b/deps/npm/node_modules/request/node_modules/mime-types/.npmignore
deleted file mode 100644
index 919d51b41e..0000000000
--- a/deps/npm/node_modules/request/node_modules/mime-types/.npmignore
+++ /dev/null
@@ -1,14 +0,0 @@
-test
-build.js
-
-# OS generated files #
-######################
-.DS_Store*
-# Icon?
-ehthumbs.db
-Thumbs.db
-
-# Node.js #
-###########
-node_modules
-npm-debug.log
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/.travis.yml b/deps/npm/node_modules/request/node_modules/mime-types/.travis.yml
deleted file mode 100644
index 73c85c65eb..0000000000
--- a/deps/npm/node_modules/request/node_modules/mime-types/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-language: node_js
-node_js:
- - "0.8"
- - "0.10"
- - "0.11"
-matrix:
- allow_failures:
- - node_js: "0.11"
- fast_finish: true
-before_install:
- # remove build script deps before install
- - node -pe 'f="./package.json";p=require(f);d=p.devDependencies;for(k in d){if("co"===k.substr(0,2))delete d[k]}require("fs").writeFileSync(f,JSON.stringify(p,null,2))'
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/HISTORY.md b/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md
index c749c7145b..5487d0d4c9 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/HISTORY.md
+++ b/deps/npm/node_modules/request/node_modules/mime-types/HISTORY.md
@@ -1,3 +1,30 @@
+2.0.8 / 2015-01-29
+==================
+
+ * deps: mime-db@~1.6.0
+ - Add new mime types
+
+2.0.7 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.5.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+
+2.0.6 / 2014-12-30
+==================
+
+ * deps: mime-db@~1.4.0
+ - Add new mime types
+ - Fix various invalid MIME type entries
+ - Remove example template MIME types
+
+2.0.5 / 2014-12-29
+==================
+
+ * deps: mime-db@~1.3.1
+ - Fix missing extensions
+
2.0.4 / 2014-12-10
==================
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/Makefile b/deps/npm/node_modules/request/node_modules/mime-types/Makefile
deleted file mode 100644
index ceaf011fb8..0000000000
--- a/deps/npm/node_modules/request/node_modules/mime-types/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-
-build:
- node --harmony-generators build.js
-
-test:
- node test/mime.js
- mocha --require should --reporter spec test/test.js
-
-.PHONY: build test
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 8e21ee1041..99d658b8b3 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
@@ -1,32 +1,33 @@
# mime-types
-[![NPM version](https://badge.fury.io/js/mime-types.svg)](https://badge.fury.io/js/mime-types) [![Build Status](https://travis-ci.org/expressjs/mime-types.svg?branch=master)](https://travis-ci.org/expressjs/mime-types)
-The ultimate javascript content-type utility.
-
-### Install
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
-```sh
-$ npm install mime-types
-```
+The ultimate javascript content-type utility.
-#### Similar to [node-mime](https://github.com/broofa/node-mime), except:
+Similar to [node-mime](https://github.com/broofa/node-mime), except:
-- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`, so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
+- __No fallbacks.__ Instead of naively returning the first available type, `mime-types` simply returns `false`,
+ so do `var type = mime.lookup('unrecognized') || 'application/octet-stream'`.
- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`.
-- Additional mime types are added such as jade and stylus. Feel free to add more!
-- Browser support via Browserify and Component by converting lists to JSON files.
+- Additional mime types are added such as jade and stylus via [mime-db](https://github.com/jshttp/mime-db)
+- No `.define()` functionality
Otherwise, the API is compatible.
-### Adding Types
+## Install
-If you'd like to add additional types,
-simply create a PR adding the type to `custom.json` and
-a reference link to the [sources](SOURCES.md).
+```sh
+$ npm install mime-types
+```
-Do __NOT__ edit `mime.json` or `node.json`.
-Those are pulled using `build.js`.
-You should only touch `custom.json`.
+## Adding Types
+
+All mime types are based on [mime-db](https://github.com/jshttp/mime-db),
+so open a PR there if you'd like to add mime types.
## API
@@ -74,28 +75,25 @@ Lookup the implied default charset of a content-type.
mime.charset('text/x-markdown') // 'UTF-8'
```
-### mime.types[extension] = type
+### var type = mime.types[extension]
A map of content-types by extension.
-### mime.extensions[type] = [extensions]
+### [extensions...] = mime.extensions[type]
A map of extensions by content-type.
-### mime.define(types)
-
-Globally add definitions.
-`types` must be an object of the form:
-
-```js
-{
- "<content-type>": [extensions...],
- "<content-type>": [extensions...]
-}
-```
-
-See the `.json` files in `lib/` for examples.
-
## License
[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/mime-types.svg?style=flat
+[npm-url]: https://npmjs.org/package/mime-types
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/mime-types.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/mime-types
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/mime-types
+[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg?style=flat
+[downloads-url]: https://npmjs.org/package/mime-types
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/SOURCES.md b/deps/npm/node_modules/request/node_modules/mime-types/SOURCES.md
deleted file mode 100644
index 1d650123e0..0000000000
--- a/deps/npm/node_modules/request/node_modules/mime-types/SOURCES.md
+++ /dev/null
@@ -1,17 +0,0 @@
-
-### Sources for custom types
-
-This is a list of sources for any custom mime types.
-When adding custom mime types, please link to where you found the mime type,
-even if it's from an unofficial source.
-
-- `text/coffeescript` - http://coffeescript.org/#scripts
-- `text/x-handlebars-template` - https://handlebarsjs.com/#getting-started
-- `text/x-sass` & `text/x-scss` - https://github.com/janlelis/rubybuntu-mime/blob/master/sass.xml
-- `text.jsx` - http://facebook.github.io/react/docs/getting-started.html [[2]](https://github.com/facebook/react/blob/f230e0a03154e6f8a616e0da1fb3d97ffa1a6472/vendor/browser-transforms.js#L210)
-
-[Sources for node.json types](https://github.com/broofa/node-mime/blob/master/types/node.types)
-
-### Notes on weird types
-
-- `font/opentype` - This type is technically invalid according to the spec. No valid types begin with `font/`. No-one uses the official type of `application/vnd.ms-opentype` as the community standardized `application/x-font-otf`. However, chrome logs nonsense warnings unless opentype fonts are served with `font/opentype`. [[1]](http://stackoverflow.com/questions/2871655/proper-mime-type-for-fonts)
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/component.json b/deps/npm/node_modules/request/node_modules/mime-types/component.json
deleted file mode 100644
index fa67a6d234..0000000000
--- a/deps/npm/node_modules/request/node_modules/mime-types/component.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "name": "mime-types",
- "description": "The ultimate javascript content-type utility.",
- "version": "0.1.0",
- "author": {
- "name": "Jonathan Ong",
- "email": "me@jongleberry.com",
- "url": "http://jongleberry.com",
- "twitter": "https://twitter.com/jongleberry"
- },
- "repository": "expressjs/mime-types",
- "license": "MIT",
- "main": "lib/index.js",
- "scripts": ["lib/index.js"],
- "json": ["mime.json", "node.json", "custom.json"]
-}
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/index.js b/deps/npm/node_modules/request/node_modules/mime-types/index.js
index b46a202f53..b46a202f53 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/index.js
+++ b/deps/npm/node_modules/request/node_modules/mime-types/index.js
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/lib/custom.json b/deps/npm/node_modules/request/node_modules/mime-types/lib/custom.json
deleted file mode 100644
index 6137da34e9..0000000000
--- a/deps/npm/node_modules/request/node_modules/mime-types/lib/custom.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "text/jade": [
- "jade"
- ],
- "text/stylus": [
- "stylus",
- "styl"
- ],
- "text/less": [
- "less"
- ],
- "text/x-sass": [
- "sass"
- ],
- "text/x-scss": [
- "scss"
- ],
- "text/coffeescript": [
- "coffee"
- ],
- "text/x-handlebars-template": [
- "hbs"
- ],
- "text/jsx": [
- "jsx"
- ]
-}
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/lib/index.js b/deps/npm/node_modules/request/node_modules/mime-types/lib/index.js
deleted file mode 100644
index cc2d155284..0000000000
--- a/deps/npm/node_modules/request/node_modules/mime-types/lib/index.js
+++ /dev/null
@@ -1,75 +0,0 @@
-
-// types[extension] = type
-exports.types = Object.create(null)
-// extensions[type] = [extensions]
-exports.extensions = Object.create(null)
-// define more mime types
-exports.define = define
-
-// store the json files
-exports.json = {
- mime: require('./mime.json'),
- node: require('./node.json'),
- custom: require('./custom.json'),
-}
-
-exports.lookup = function (string) {
- if (!string || typeof string !== "string") return false
- string = string.replace(/.*[\.\/\\]/, '').toLowerCase()
- if (!string) return false
- return exports.types[string] || false
-}
-
-exports.extension = function (type) {
- if (!type || typeof type !== "string") return false
- type = type.match(/^\s*([^;\s]*)(?:;|\s|$)/)
- if (!type) return false
- var exts = exports.extensions[type[1].toLowerCase()]
- if (!exts || !exts.length) return false
- return exts[0]
-}
-
-// type has to be an exact mime type
-exports.charset = function (type) {
- // special cases
- switch (type) {
- case 'application/json': return 'UTF-8'
- case 'application/javascript': return 'UTF-8'
- }
-
- // default text/* to utf-8
- if (/^text\//.test(type)) return 'UTF-8'
-
- return false
-}
-
-// backwards compatibility
-exports.charsets = {
- lookup: exports.charset
-}
-
-exports.contentType = function (type) {
- if (!type || typeof type !== "string") return false
- if (!~type.indexOf('/')) type = exports.lookup(type)
- if (!type) return false
- if (!~type.indexOf('charset')) {
- var charset = exports.charset(type)
- if (charset) type += '; charset=' + charset.toLowerCase()
- }
- return type
-}
-
-define(exports.json.mime)
-define(exports.json.node)
-define(exports.json.custom)
-
-function define(json) {
- Object.keys(json).forEach(function (type) {
- var exts = json[type] || []
- exports.extensions[type] = exports.extensions[type] || []
- exts.forEach(function (ext) {
- if (!~exports.extensions[type].indexOf(ext)) exports.extensions[type].push(ext)
- exports.types[ext] = type
- })
- })
-}
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/lib/mime.json b/deps/npm/node_modules/request/node_modules/mime-types/lib/mime.json
deleted file mode 100644
index f445a86eba..0000000000
--- a/deps/npm/node_modules/request/node_modules/mime-types/lib/mime.json
+++ /dev/null
@@ -1,3317 +0,0 @@
-{
- "application/1d-interleaved-parityfec": [],
- "application/3gpp-ims+xml": [],
- "application/activemessage": [],
- "application/andrew-inset": [
- "ez"
- ],
- "application/applefile": [],
- "application/applixware": [
- "aw"
- ],
- "application/atom+xml": [
- "atom"
- ],
- "application/atomcat+xml": [
- "atomcat"
- ],
- "application/atomicmail": [],
- "application/atomsvc+xml": [
- "atomsvc"
- ],
- "application/auth-policy+xml": [],
- "application/batch-smtp": [],
- "application/beep+xml": [],
- "application/calendar+xml": [],
- "application/cals-1840": [],
- "application/ccmp+xml": [],
- "application/ccxml+xml": [
- "ccxml"
- ],
- "application/cdmi-capability": [
- "cdmia"
- ],
- "application/cdmi-container": [
- "cdmic"
- ],
- "application/cdmi-domain": [
- "cdmid"
- ],
- "application/cdmi-object": [
- "cdmio"
- ],
- "application/cdmi-queue": [
- "cdmiq"
- ],
- "application/cea-2018+xml": [],
- "application/cellml+xml": [],
- "application/cfw": [],
- "application/cnrp+xml": [],
- "application/commonground": [],
- "application/conference-info+xml": [],
- "application/cpl+xml": [],
- "application/csta+xml": [],
- "application/cstadata+xml": [],
- "application/cu-seeme": [
- "cu"
- ],
- "application/cybercash": [],
- "application/davmount+xml": [
- "davmount"
- ],
- "application/dca-rft": [],
- "application/dec-dx": [],
- "application/dialog-info+xml": [],
- "application/dicom": [],
- "application/dns": [],
- "application/docbook+xml": [
- "dbk"
- ],
- "application/dskpp+xml": [],
- "application/dssc+der": [
- "dssc"
- ],
- "application/dssc+xml": [
- "xdssc"
- ],
- "application/dvcs": [],
- "application/ecmascript": [
- "ecma"
- ],
- "application/edi-consent": [],
- "application/edi-x12": [],
- "application/edifact": [],
- "application/emma+xml": [
- "emma"
- ],
- "application/epp+xml": [],
- "application/epub+zip": [
- "epub"
- ],
- "application/eshop": [],
- "application/example": [],
- "application/exi": [
- "exi"
- ],
- "application/fastinfoset": [],
- "application/fastsoap": [],
- "application/fits": [],
- "application/font-tdpfr": [
- "pfr"
- ],
- "application/framework-attributes+xml": [],
- "application/gml+xml": [
- "gml"
- ],
- "application/gpx+xml": [
- "gpx"
- ],
- "application/gxf": [
- "gxf"
- ],
- "application/h224": [],
- "application/held+xml": [],
- "application/http": [],
- "application/hyperstudio": [
- "stk"
- ],
- "application/ibe-key-request+xml": [],
- "application/ibe-pkg-reply+xml": [],
- "application/ibe-pp-data": [],
- "application/iges": [],
- "application/im-iscomposing+xml": [],
- "application/index": [],
- "application/index.cmd": [],
- "application/index.obj": [],
- "application/index.response": [],
- "application/index.vnd": [],
- "application/inkml+xml": [
- "ink",
- "inkml"
- ],
- "application/iotp": [],
- "application/ipfix": [
- "ipfix"
- ],
- "application/ipp": [],
- "application/isup": [],
- "application/java-archive": [
- "jar"
- ],
- "application/java-serialized-object": [
- "ser"
- ],
- "application/java-vm": [
- "class"
- ],
- "application/javascript": [
- "js"
- ],
- "application/json": [
- "json"
- ],
- "application/jsonml+json": [
- "jsonml"
- ],
- "application/kpml-request+xml": [],
- "application/kpml-response+xml": [],
- "application/lost+xml": [
- "lostxml"
- ],
- "application/mac-binhex40": [
- "hqx"
- ],
- "application/mac-compactpro": [
- "cpt"
- ],
- "application/macwriteii": [],
- "application/mads+xml": [
- "mads"
- ],
- "application/marc": [
- "mrc"
- ],
- "application/marcxml+xml": [
- "mrcx"
- ],
- "application/mathematica": [
- "ma",
- "nb",
- "mb"
- ],
- "application/mathml-content+xml": [],
- "application/mathml-presentation+xml": [],
- "application/mathml+xml": [
- "mathml"
- ],
- "application/mbms-associated-procedure-description+xml": [],
- "application/mbms-deregister+xml": [],
- "application/mbms-envelope+xml": [],
- "application/mbms-msk+xml": [],
- "application/mbms-msk-response+xml": [],
- "application/mbms-protection-description+xml": [],
- "application/mbms-reception-report+xml": [],
- "application/mbms-register+xml": [],
- "application/mbms-register-response+xml": [],
- "application/mbms-user-service-description+xml": [],
- "application/mbox": [
- "mbox"
- ],
- "application/media_control+xml": [],
- "application/mediaservercontrol+xml": [
- "mscml"
- ],
- "application/metalink+xml": [
- "metalink"
- ],
- "application/metalink4+xml": [
- "meta4"
- ],
- "application/mets+xml": [
- "mets"
- ],
- "application/mikey": [],
- "application/mods+xml": [
- "mods"
- ],
- "application/moss-keys": [],
- "application/moss-signature": [],
- "application/mosskey-data": [],
- "application/mosskey-request": [],
- "application/mp21": [
- "m21",
- "mp21"
- ],
- "application/mp4": [
- "mp4s"
- ],
- "application/mpeg4-generic": [],
- "application/mpeg4-iod": [],
- "application/mpeg4-iod-xmt": [],
- "application/msc-ivr+xml": [],
- "application/msc-mixer+xml": [],
- "application/msword": [
- "doc",
- "dot"
- ],
- "application/mxf": [
- "mxf"
- ],
- "application/nasdata": [],
- "application/news-checkgroups": [],
- "application/news-groupinfo": [],
- "application/news-transmission": [],
- "application/nss": [],
- "application/ocsp-request": [],
- "application/ocsp-response": [],
- "application/octet-stream": [
- "bin",
- "dms",
- "lrf",
- "mar",
- "so",
- "dist",
- "distz",
- "pkg",
- "bpk",
- "dump",
- "elc",
- "deploy"
- ],
- "application/oda": [
- "oda"
- ],
- "application/oebps-package+xml": [
- "opf"
- ],
- "application/ogg": [
- "ogx"
- ],
- "application/omdoc+xml": [
- "omdoc"
- ],
- "application/onenote": [
- "onetoc",
- "onetoc2",
- "onetmp",
- "onepkg"
- ],
- "application/oxps": [
- "oxps"
- ],
- "application/parityfec": [],
- "application/patch-ops-error+xml": [
- "xer"
- ],
- "application/pdf": [
- "pdf"
- ],
- "application/pgp-encrypted": [
- "pgp"
- ],
- "application/pgp-keys": [],
- "application/pgp-signature": [
- "asc",
- "sig"
- ],
- "application/pics-rules": [
- "prf"
- ],
- "application/pidf+xml": [],
- "application/pidf-diff+xml": [],
- "application/pkcs10": [
- "p10"
- ],
- "application/pkcs7-mime": [
- "p7m",
- "p7c"
- ],
- "application/pkcs7-signature": [
- "p7s"
- ],
- "application/pkcs8": [
- "p8"
- ],
- "application/pkix-attr-cert": [
- "ac"
- ],
- "application/pkix-cert": [
- "cer"
- ],
- "application/pkix-crl": [
- "crl"
- ],
- "application/pkix-pkipath": [
- "pkipath"
- ],
- "application/pkixcmp": [
- "pki"
- ],
- "application/pls+xml": [
- "pls"
- ],
- "application/poc-settings+xml": [],
- "application/postscript": [
- "ai",
- "eps",
- "ps"
- ],
- "application/prs.alvestrand.titrax-sheet": [],
- "application/prs.cww": [
- "cww"
- ],
- "application/prs.nprend": [],
- "application/prs.plucker": [],
- "application/prs.rdf-xml-crypt": [],
- "application/prs.xsf+xml": [],
- "application/pskc+xml": [
- "pskcxml"
- ],
- "application/qsig": [],
- "application/rdf+xml": [
- "rdf"
- ],
- "application/reginfo+xml": [
- "rif"
- ],
- "application/relax-ng-compact-syntax": [
- "rnc"
- ],
- "application/remote-printing": [],
- "application/resource-lists+xml": [
- "rl"
- ],
- "application/resource-lists-diff+xml": [
- "rld"
- ],
- "application/riscos": [],
- "application/rlmi+xml": [],
- "application/rls-services+xml": [
- "rs"
- ],
- "application/rpki-ghostbusters": [
- "gbr"
- ],
- "application/rpki-manifest": [
- "mft"
- ],
- "application/rpki-roa": [
- "roa"
- ],
- "application/rpki-updown": [],
- "application/rsd+xml": [
- "rsd"
- ],
- "application/rss+xml": [
- "rss"
- ],
- "application/rtf": [
- "rtf"
- ],
- "application/rtx": [],
- "application/samlassertion+xml": [],
- "application/samlmetadata+xml": [],
- "application/sbml+xml": [
- "sbml"
- ],
- "application/scvp-cv-request": [
- "scq"
- ],
- "application/scvp-cv-response": [
- "scs"
- ],
- "application/scvp-vp-request": [
- "spq"
- ],
- "application/scvp-vp-response": [
- "spp"
- ],
- "application/sdp": [
- "sdp"
- ],
- "application/set-payment": [],
- "application/set-payment-initiation": [
- "setpay"
- ],
- "application/set-registration": [],
- "application/set-registration-initiation": [
- "setreg"
- ],
- "application/sgml": [],
- "application/sgml-open-catalog": [],
- "application/shf+xml": [
- "shf"
- ],
- "application/sieve": [],
- "application/simple-filter+xml": [],
- "application/simple-message-summary": [],
- "application/simplesymbolcontainer": [],
- "application/slate": [],
- "application/smil": [],
- "application/smil+xml": [
- "smi",
- "smil"
- ],
- "application/soap+fastinfoset": [],
- "application/soap+xml": [],
- "application/sparql-query": [
- "rq"
- ],
- "application/sparql-results+xml": [
- "srx"
- ],
- "application/spirits-event+xml": [],
- "application/srgs": [
- "gram"
- ],
- "application/srgs+xml": [
- "grxml"
- ],
- "application/sru+xml": [
- "sru"
- ],
- "application/ssdl+xml": [
- "ssdl"
- ],
- "application/ssml+xml": [
- "ssml"
- ],
- "application/tamp-apex-update": [],
- "application/tamp-apex-update-confirm": [],
- "application/tamp-community-update": [],
- "application/tamp-community-update-confirm": [],
- "application/tamp-error": [],
- "application/tamp-sequence-adjust": [],
- "application/tamp-sequence-adjust-confirm": [],
- "application/tamp-status-query": [],
- "application/tamp-status-response": [],
- "application/tamp-update": [],
- "application/tamp-update-confirm": [],
- "application/tei+xml": [
- "tei",
- "teicorpus"
- ],
- "application/thraud+xml": [
- "tfi"
- ],
- "application/timestamp-query": [],
- "application/timestamp-reply": [],
- "application/timestamped-data": [
- "tsd"
- ],
- "application/tve-trigger": [],
- "application/ulpfec": [],
- "application/vcard+xml": [],
- "application/vemmi": [],
- "application/vividence.scriptfile": [],
- "application/vnd.3gpp.bsf+xml": [],
- "application/vnd.3gpp.pic-bw-large": [
- "plb"
- ],
- "application/vnd.3gpp.pic-bw-small": [
- "psb"
- ],
- "application/vnd.3gpp.pic-bw-var": [
- "pvb"
- ],
- "application/vnd.3gpp.sms": [],
- "application/vnd.3gpp2.bcmcsinfo+xml": [],
- "application/vnd.3gpp2.sms": [],
- "application/vnd.3gpp2.tcap": [
- "tcap"
- ],
- "application/vnd.3m.post-it-notes": [
- "pwn"
- ],
- "application/vnd.accpac.simply.aso": [
- "aso"
- ],
- "application/vnd.accpac.simply.imp": [
- "imp"
- ],
- "application/vnd.acucobol": [
- "acu"
- ],
- "application/vnd.acucorp": [
- "atc",
- "acutc"
- ],
- "application/vnd.adobe.air-application-installer-package+zip": [
- "air"
- ],
- "application/vnd.adobe.formscentral.fcdt": [
- "fcdt"
- ],
- "application/vnd.adobe.fxp": [
- "fxp",
- "fxpl"
- ],
- "application/vnd.adobe.partial-upload": [],
- "application/vnd.adobe.xdp+xml": [
- "xdp"
- ],
- "application/vnd.adobe.xfdf": [
- "xfdf"
- ],
- "application/vnd.aether.imp": [],
- "application/vnd.ah-barcode": [],
- "application/vnd.ahead.space": [
- "ahead"
- ],
- "application/vnd.airzip.filesecure.azf": [
- "azf"
- ],
- "application/vnd.airzip.filesecure.azs": [
- "azs"
- ],
- "application/vnd.amazon.ebook": [
- "azw"
- ],
- "application/vnd.americandynamics.acc": [
- "acc"
- ],
- "application/vnd.amiga.ami": [
- "ami"
- ],
- "application/vnd.amundsen.maze+xml": [],
- "application/vnd.android.package-archive": [
- "apk"
- ],
- "application/vnd.anser-web-certificate-issue-initiation": [
- "cii"
- ],
- "application/vnd.anser-web-funds-transfer-initiation": [
- "fti"
- ],
- "application/vnd.antix.game-component": [
- "atx"
- ],
- "application/vnd.apple.installer+xml": [
- "mpkg"
- ],
- "application/vnd.apple.mpegurl": [
- "m3u8"
- ],
- "application/vnd.arastra.swi": [],
- "application/vnd.aristanetworks.swi": [
- "swi"
- ],
- "application/vnd.astraea-software.iota": [
- "iota"
- ],
- "application/vnd.audiograph": [
- "aep"
- ],
- "application/vnd.autopackage": [],
- "application/vnd.avistar+xml": [],
- "application/vnd.blueice.multipass": [
- "mpm"
- ],
- "application/vnd.bluetooth.ep.oob": [],
- "application/vnd.bmi": [
- "bmi"
- ],
- "application/vnd.businessobjects": [
- "rep"
- ],
- "application/vnd.cab-jscript": [],
- "application/vnd.canon-cpdl": [],
- "application/vnd.canon-lips": [],
- "application/vnd.cendio.thinlinc.clientconf": [],
- "application/vnd.chemdraw+xml": [
- "cdxml"
- ],
- "application/vnd.chipnuts.karaoke-mmd": [
- "mmd"
- ],
- "application/vnd.cinderella": [
- "cdy"
- ],
- "application/vnd.cirpack.isdn-ext": [],
- "application/vnd.claymore": [
- "cla"
- ],
- "application/vnd.cloanto.rp9": [
- "rp9"
- ],
- "application/vnd.clonk.c4group": [
- "c4g",
- "c4d",
- "c4f",
- "c4p",
- "c4u"
- ],
- "application/vnd.cluetrust.cartomobile-config": [
- "c11amc"
- ],
- "application/vnd.cluetrust.cartomobile-config-pkg": [
- "c11amz"
- ],
- "application/vnd.collection+json": [],
- "application/vnd.commerce-battelle": [],
- "application/vnd.commonspace": [
- "csp"
- ],
- "application/vnd.contact.cmsg": [
- "cdbcmsg"
- ],
- "application/vnd.cosmocaller": [
- "cmc"
- ],
- "application/vnd.crick.clicker": [
- "clkx"
- ],
- "application/vnd.crick.clicker.keyboard": [
- "clkk"
- ],
- "application/vnd.crick.clicker.palette": [
- "clkp"
- ],
- "application/vnd.crick.clicker.template": [
- "clkt"
- ],
- "application/vnd.crick.clicker.wordbank": [
- "clkw"
- ],
- "application/vnd.criticaltools.wbs+xml": [
- "wbs"
- ],
- "application/vnd.ctc-posml": [
- "pml"
- ],
- "application/vnd.ctct.ws+xml": [],
- "application/vnd.cups-pdf": [],
- "application/vnd.cups-postscript": [],
- "application/vnd.cups-ppd": [
- "ppd"
- ],
- "application/vnd.cups-raster": [],
- "application/vnd.cups-raw": [],
- "application/vnd.curl": [],
- "application/vnd.curl.car": [
- "car"
- ],
- "application/vnd.curl.pcurl": [
- "pcurl"
- ],
- "application/vnd.cybank": [],
- "application/vnd.dart": [
- "dart"
- ],
- "application/vnd.data-vision.rdz": [
- "rdz"
- ],
- "application/vnd.dece.data": [
- "uvf",
- "uvvf",
- "uvd",
- "uvvd"
- ],
- "application/vnd.dece.ttml+xml": [
- "uvt",
- "uvvt"
- ],
- "application/vnd.dece.unspecified": [
- "uvx",
- "uvvx"
- ],
- "application/vnd.dece.zip": [
- "uvz",
- "uvvz"
- ],
- "application/vnd.denovo.fcselayout-link": [
- "fe_launch"
- ],
- "application/vnd.dir-bi.plate-dl-nosuffix": [],
- "application/vnd.dna": [
- "dna"
- ],
- "application/vnd.dolby.mlp": [
- "mlp"
- ],
- "application/vnd.dolby.mobile.1": [],
- "application/vnd.dolby.mobile.2": [],
- "application/vnd.dpgraph": [
- "dpg"
- ],
- "application/vnd.dreamfactory": [
- "dfac"
- ],
- "application/vnd.ds-keypoint": [
- "kpxx"
- ],
- "application/vnd.dvb.ait": [
- "ait"
- ],
- "application/vnd.dvb.dvbj": [],
- "application/vnd.dvb.esgcontainer": [],
- "application/vnd.dvb.ipdcdftnotifaccess": [],
- "application/vnd.dvb.ipdcesgaccess": [],
- "application/vnd.dvb.ipdcesgaccess2": [],
- "application/vnd.dvb.ipdcesgpdd": [],
- "application/vnd.dvb.ipdcroaming": [],
- "application/vnd.dvb.iptv.alfec-base": [],
- "application/vnd.dvb.iptv.alfec-enhancement": [],
- "application/vnd.dvb.notif-aggregate-root+xml": [],
- "application/vnd.dvb.notif-container+xml": [],
- "application/vnd.dvb.notif-generic+xml": [],
- "application/vnd.dvb.notif-ia-msglist+xml": [],
- "application/vnd.dvb.notif-ia-registration-request+xml": [],
- "application/vnd.dvb.notif-ia-registration-response+xml": [],
- "application/vnd.dvb.notif-init+xml": [],
- "application/vnd.dvb.pfr": [],
- "application/vnd.dvb.service": [
- "svc"
- ],
- "application/vnd.dxr": [],
- "application/vnd.dynageo": [
- "geo"
- ],
- "application/vnd.easykaraoke.cdgdownload": [],
- "application/vnd.ecdis-update": [],
- "application/vnd.ecowin.chart": [
- "mag"
- ],
- "application/vnd.ecowin.filerequest": [],
- "application/vnd.ecowin.fileupdate": [],
- "application/vnd.ecowin.series": [],
- "application/vnd.ecowin.seriesrequest": [],
- "application/vnd.ecowin.seriesupdate": [],
- "application/vnd.emclient.accessrequest+xml": [],
- "application/vnd.enliven": [
- "nml"
- ],
- "application/vnd.eprints.data+xml": [],
- "application/vnd.epson.esf": [
- "esf"
- ],
- "application/vnd.epson.msf": [
- "msf"
- ],
- "application/vnd.epson.quickanime": [
- "qam"
- ],
- "application/vnd.epson.salt": [
- "slt"
- ],
- "application/vnd.epson.ssf": [
- "ssf"
- ],
- "application/vnd.ericsson.quickcall": [],
- "application/vnd.eszigno3+xml": [
- "es3",
- "et3"
- ],
- "application/vnd.etsi.aoc+xml": [],
- "application/vnd.etsi.cug+xml": [],
- "application/vnd.etsi.iptvcommand+xml": [],
- "application/vnd.etsi.iptvdiscovery+xml": [],
- "application/vnd.etsi.iptvprofile+xml": [],
- "application/vnd.etsi.iptvsad-bc+xml": [],
- "application/vnd.etsi.iptvsad-cod+xml": [],
- "application/vnd.etsi.iptvsad-npvr+xml": [],
- "application/vnd.etsi.iptvservice+xml": [],
- "application/vnd.etsi.iptvsync+xml": [],
- "application/vnd.etsi.iptvueprofile+xml": [],
- "application/vnd.etsi.mcid+xml": [],
- "application/vnd.etsi.overload-control-policy-dataset+xml": [],
- "application/vnd.etsi.sci+xml": [],
- "application/vnd.etsi.simservs+xml": [],
- "application/vnd.etsi.tsl+xml": [],
- "application/vnd.etsi.tsl.der": [],
- "application/vnd.eudora.data": [],
- "application/vnd.ezpix-album": [
- "ez2"
- ],
- "application/vnd.ezpix-package": [
- "ez3"
- ],
- "application/vnd.f-secure.mobile": [],
- "application/vnd.fdf": [
- "fdf"
- ],
- "application/vnd.fdsn.mseed": [
- "mseed"
- ],
- "application/vnd.fdsn.seed": [
- "seed",
- "dataless"
- ],
- "application/vnd.ffsns": [],
- "application/vnd.fints": [],
- "application/vnd.flographit": [
- "gph"
- ],
- "application/vnd.fluxtime.clip": [
- "ftc"
- ],
- "application/vnd.font-fontforge-sfd": [],
- "application/vnd.framemaker": [
- "fm",
- "frame",
- "maker",
- "book"
- ],
- "application/vnd.frogans.fnc": [
- "fnc"
- ],
- "application/vnd.frogans.ltf": [
- "ltf"
- ],
- "application/vnd.fsc.weblaunch": [
- "fsc"
- ],
- "application/vnd.fujitsu.oasys": [
- "oas"
- ],
- "application/vnd.fujitsu.oasys2": [
- "oa2"
- ],
- "application/vnd.fujitsu.oasys3": [
- "oa3"
- ],
- "application/vnd.fujitsu.oasysgp": [
- "fg5"
- ],
- "application/vnd.fujitsu.oasysprs": [
- "bh2"
- ],
- "application/vnd.fujixerox.art-ex": [],
- "application/vnd.fujixerox.art4": [],
- "application/vnd.fujixerox.hbpl": [],
- "application/vnd.fujixerox.ddd": [
- "ddd"
- ],
- "application/vnd.fujixerox.docuworks": [
- "xdw"
- ],
- "application/vnd.fujixerox.docuworks.binder": [
- "xbd"
- ],
- "application/vnd.fut-misnet": [],
- "application/vnd.fuzzysheet": [
- "fzs"
- ],
- "application/vnd.genomatix.tuxedo": [
- "txd"
- ],
- "application/vnd.geocube+xml": [],
- "application/vnd.geogebra.file": [
- "ggb"
- ],
- "application/vnd.geogebra.tool": [
- "ggt"
- ],
- "application/vnd.geometry-explorer": [
- "gex",
- "gre"
- ],
- "application/vnd.geonext": [
- "gxt"
- ],
- "application/vnd.geoplan": [
- "g2w"
- ],
- "application/vnd.geospace": [
- "g3w"
- ],
- "application/vnd.globalplatform.card-content-mgt": [],
- "application/vnd.globalplatform.card-content-mgt-response": [],
- "application/vnd.gmx": [
- "gmx"
- ],
- "application/vnd.google-earth.kml+xml": [
- "kml"
- ],
- "application/vnd.google-earth.kmz": [
- "kmz"
- ],
- "application/vnd.grafeq": [
- "gqf",
- "gqs"
- ],
- "application/vnd.gridmp": [],
- "application/vnd.groove-account": [
- "gac"
- ],
- "application/vnd.groove-help": [
- "ghf"
- ],
- "application/vnd.groove-identity-message": [
- "gim"
- ],
- "application/vnd.groove-injector": [
- "grv"
- ],
- "application/vnd.groove-tool-message": [
- "gtm"
- ],
- "application/vnd.groove-tool-template": [
- "tpl"
- ],
- "application/vnd.groove-vcard": [
- "vcg"
- ],
- "application/vnd.hal+json": [],
- "application/vnd.hal+xml": [
- "hal"
- ],
- "application/vnd.handheld-entertainment+xml": [
- "zmm"
- ],
- "application/vnd.hbci": [
- "hbci"
- ],
- "application/vnd.hcl-bireports": [],
- "application/vnd.hhe.lesson-player": [
- "les"
- ],
- "application/vnd.hp-hpgl": [
- "hpgl"
- ],
- "application/vnd.hp-hpid": [
- "hpid"
- ],
- "application/vnd.hp-hps": [
- "hps"
- ],
- "application/vnd.hp-jlyt": [
- "jlt"
- ],
- "application/vnd.hp-pcl": [
- "pcl"
- ],
- "application/vnd.hp-pclxl": [
- "pclxl"
- ],
- "application/vnd.httphone": [],
- "application/vnd.hzn-3d-crossword": [],
- "application/vnd.ibm.afplinedata": [],
- "application/vnd.ibm.electronic-media": [],
- "application/vnd.ibm.minipay": [
- "mpy"
- ],
- "application/vnd.ibm.modcap": [
- "afp",
- "listafp",
- "list3820"
- ],
- "application/vnd.ibm.rights-management": [
- "irm"
- ],
- "application/vnd.ibm.secure-container": [
- "sc"
- ],
- "application/vnd.iccprofile": [
- "icc",
- "icm"
- ],
- "application/vnd.igloader": [
- "igl"
- ],
- "application/vnd.immervision-ivp": [
- "ivp"
- ],
- "application/vnd.immervision-ivu": [
- "ivu"
- ],
- "application/vnd.informedcontrol.rms+xml": [],
- "application/vnd.informix-visionary": [],
- "application/vnd.infotech.project": [],
- "application/vnd.infotech.project+xml": [],
- "application/vnd.innopath.wamp.notification": [],
- "application/vnd.insors.igm": [
- "igm"
- ],
- "application/vnd.intercon.formnet": [
- "xpw",
- "xpx"
- ],
- "application/vnd.intergeo": [
- "i2g"
- ],
- "application/vnd.intertrust.digibox": [],
- "application/vnd.intertrust.nncp": [],
- "application/vnd.intu.qbo": [
- "qbo"
- ],
- "application/vnd.intu.qfx": [
- "qfx"
- ],
- "application/vnd.iptc.g2.conceptitem+xml": [],
- "application/vnd.iptc.g2.knowledgeitem+xml": [],
- "application/vnd.iptc.g2.newsitem+xml": [],
- "application/vnd.iptc.g2.newsmessage+xml": [],
- "application/vnd.iptc.g2.packageitem+xml": [],
- "application/vnd.iptc.g2.planningitem+xml": [],
- "application/vnd.ipunplugged.rcprofile": [
- "rcprofile"
- ],
- "application/vnd.irepository.package+xml": [
- "irp"
- ],
- "application/vnd.is-xpr": [
- "xpr"
- ],
- "application/vnd.isac.fcs": [
- "fcs"
- ],
- "application/vnd.jam": [
- "jam"
- ],
- "application/vnd.japannet-directory-service": [],
- "application/vnd.japannet-jpnstore-wakeup": [],
- "application/vnd.japannet-payment-wakeup": [],
- "application/vnd.japannet-registration": [],
- "application/vnd.japannet-registration-wakeup": [],
- "application/vnd.japannet-setstore-wakeup": [],
- "application/vnd.japannet-verification": [],
- "application/vnd.japannet-verification-wakeup": [],
- "application/vnd.jcp.javame.midlet-rms": [
- "rms"
- ],
- "application/vnd.jisp": [
- "jisp"
- ],
- "application/vnd.joost.joda-archive": [
- "joda"
- ],
- "application/vnd.kahootz": [
- "ktz",
- "ktr"
- ],
- "application/vnd.kde.karbon": [
- "karbon"
- ],
- "application/vnd.kde.kchart": [
- "chrt"
- ],
- "application/vnd.kde.kformula": [
- "kfo"
- ],
- "application/vnd.kde.kivio": [
- "flw"
- ],
- "application/vnd.kde.kontour": [
- "kon"
- ],
- "application/vnd.kde.kpresenter": [
- "kpr",
- "kpt"
- ],
- "application/vnd.kde.kspread": [
- "ksp"
- ],
- "application/vnd.kde.kword": [
- "kwd",
- "kwt"
- ],
- "application/vnd.kenameaapp": [
- "htke"
- ],
- "application/vnd.kidspiration": [
- "kia"
- ],
- "application/vnd.kinar": [
- "kne",
- "knp"
- ],
- "application/vnd.koan": [
- "skp",
- "skd",
- "skt",
- "skm"
- ],
- "application/vnd.kodak-descriptor": [
- "sse"
- ],
- "application/vnd.las.las+xml": [
- "lasxml"
- ],
- "application/vnd.liberty-request+xml": [],
- "application/vnd.llamagraphics.life-balance.desktop": [
- "lbd"
- ],
- "application/vnd.llamagraphics.life-balance.exchange+xml": [
- "lbe"
- ],
- "application/vnd.lotus-1-2-3": [
- "123"
- ],
- "application/vnd.lotus-approach": [
- "apr"
- ],
- "application/vnd.lotus-freelance": [
- "pre"
- ],
- "application/vnd.lotus-notes": [
- "nsf"
- ],
- "application/vnd.lotus-organizer": [
- "org"
- ],
- "application/vnd.lotus-screencam": [
- "scm"
- ],
- "application/vnd.lotus-wordpro": [
- "lwp"
- ],
- "application/vnd.macports.portpkg": [
- "portpkg"
- ],
- "application/vnd.marlin.drm.actiontoken+xml": [],
- "application/vnd.marlin.drm.conftoken+xml": [],
- "application/vnd.marlin.drm.license+xml": [],
- "application/vnd.marlin.drm.mdcf": [],
- "application/vnd.mcd": [
- "mcd"
- ],
- "application/vnd.medcalcdata": [
- "mc1"
- ],
- "application/vnd.mediastation.cdkey": [
- "cdkey"
- ],
- "application/vnd.meridian-slingshot": [],
- "application/vnd.mfer": [
- "mwf"
- ],
- "application/vnd.mfmp": [
- "mfm"
- ],
- "application/vnd.micrografx.flo": [
- "flo"
- ],
- "application/vnd.micrografx.igx": [
- "igx"
- ],
- "application/vnd.mif": [
- "mif"
- ],
- "application/vnd.minisoft-hp3000-save": [],
- "application/vnd.mitsubishi.misty-guard.trustweb": [],
- "application/vnd.mobius.daf": [
- "daf"
- ],
- "application/vnd.mobius.dis": [
- "dis"
- ],
- "application/vnd.mobius.mbk": [
- "mbk"
- ],
- "application/vnd.mobius.mqy": [
- "mqy"
- ],
- "application/vnd.mobius.msl": [
- "msl"
- ],
- "application/vnd.mobius.plc": [
- "plc"
- ],
- "application/vnd.mobius.txf": [
- "txf"
- ],
- "application/vnd.mophun.application": [
- "mpn"
- ],
- "application/vnd.mophun.certificate": [
- "mpc"
- ],
- "application/vnd.motorola.flexsuite": [],
- "application/vnd.motorola.flexsuite.adsi": [],
- "application/vnd.motorola.flexsuite.fis": [],
- "application/vnd.motorola.flexsuite.gotap": [],
- "application/vnd.motorola.flexsuite.kmr": [],
- "application/vnd.motorola.flexsuite.ttc": [],
- "application/vnd.motorola.flexsuite.wem": [],
- "application/vnd.motorola.iprm": [],
- "application/vnd.mozilla.xul+xml": [
- "xul"
- ],
- "application/vnd.ms-artgalry": [
- "cil"
- ],
- "application/vnd.ms-asf": [],
- "application/vnd.ms-cab-compressed": [
- "cab"
- ],
- "application/vnd.ms-color.iccprofile": [],
- "application/vnd.ms-excel": [
- "xls",
- "xlm",
- "xla",
- "xlc",
- "xlt",
- "xlw"
- ],
- "application/vnd.ms-excel.addin.macroenabled.12": [
- "xlam"
- ],
- "application/vnd.ms-excel.sheet.binary.macroenabled.12": [
- "xlsb"
- ],
- "application/vnd.ms-excel.sheet.macroenabled.12": [
- "xlsm"
- ],
- "application/vnd.ms-excel.template.macroenabled.12": [
- "xltm"
- ],
- "application/vnd.ms-fontobject": [
- "eot"
- ],
- "application/vnd.ms-htmlhelp": [
- "chm"
- ],
- "application/vnd.ms-ims": [
- "ims"
- ],
- "application/vnd.ms-lrm": [
- "lrm"
- ],
- "application/vnd.ms-office.activex+xml": [],
- "application/vnd.ms-officetheme": [
- "thmx"
- ],
- "application/vnd.ms-opentype": [],
- "application/vnd.ms-package.obfuscated-opentype": [],
- "application/vnd.ms-pki.seccat": [
- "cat"
- ],
- "application/vnd.ms-pki.stl": [
- "stl"
- ],
- "application/vnd.ms-playready.initiator+xml": [],
- "application/vnd.ms-powerpoint": [
- "ppt",
- "pps",
- "pot"
- ],
- "application/vnd.ms-powerpoint.addin.macroenabled.12": [
- "ppam"
- ],
- "application/vnd.ms-powerpoint.presentation.macroenabled.12": [
- "pptm"
- ],
- "application/vnd.ms-powerpoint.slide.macroenabled.12": [
- "sldm"
- ],
- "application/vnd.ms-powerpoint.slideshow.macroenabled.12": [
- "ppsm"
- ],
- "application/vnd.ms-powerpoint.template.macroenabled.12": [
- "potm"
- ],
- "application/vnd.ms-printing.printticket+xml": [],
- "application/vnd.ms-project": [
- "mpp",
- "mpt"
- ],
- "application/vnd.ms-tnef": [],
- "application/vnd.ms-wmdrm.lic-chlg-req": [],
- "application/vnd.ms-wmdrm.lic-resp": [],
- "application/vnd.ms-wmdrm.meter-chlg-req": [],
- "application/vnd.ms-wmdrm.meter-resp": [],
- "application/vnd.ms-word.document.macroenabled.12": [
- "docm"
- ],
- "application/vnd.ms-word.template.macroenabled.12": [
- "dotm"
- ],
- "application/vnd.ms-works": [
- "wps",
- "wks",
- "wcm",
- "wdb"
- ],
- "application/vnd.ms-wpl": [
- "wpl"
- ],
- "application/vnd.ms-xpsdocument": [
- "xps"
- ],
- "application/vnd.mseq": [
- "mseq"
- ],
- "application/vnd.msign": [],
- "application/vnd.multiad.creator": [],
- "application/vnd.multiad.creator.cif": [],
- "application/vnd.music-niff": [],
- "application/vnd.musician": [
- "mus"
- ],
- "application/vnd.muvee.style": [
- "msty"
- ],
- "application/vnd.mynfc": [
- "taglet"
- ],
- "application/vnd.ncd.control": [],
- "application/vnd.ncd.reference": [],
- "application/vnd.nervana": [],
- "application/vnd.netfpx": [],
- "application/vnd.neurolanguage.nlu": [
- "nlu"
- ],
- "application/vnd.nitf": [
- "ntf",
- "nitf"
- ],
- "application/vnd.noblenet-directory": [
- "nnd"
- ],
- "application/vnd.noblenet-sealer": [
- "nns"
- ],
- "application/vnd.noblenet-web": [
- "nnw"
- ],
- "application/vnd.nokia.catalogs": [],
- "application/vnd.nokia.conml+wbxml": [],
- "application/vnd.nokia.conml+xml": [],
- "application/vnd.nokia.isds-radio-presets": [],
- "application/vnd.nokia.iptv.config+xml": [],
- "application/vnd.nokia.landmark+wbxml": [],
- "application/vnd.nokia.landmark+xml": [],
- "application/vnd.nokia.landmarkcollection+xml": [],
- "application/vnd.nokia.n-gage.ac+xml": [],
- "application/vnd.nokia.n-gage.data": [
- "ngdat"
- ],
- "application/vnd.nokia.ncd": [],
- "application/vnd.nokia.pcd+wbxml": [],
- "application/vnd.nokia.pcd+xml": [],
- "application/vnd.nokia.radio-preset": [
- "rpst"
- ],
- "application/vnd.nokia.radio-presets": [
- "rpss"
- ],
- "application/vnd.novadigm.edm": [
- "edm"
- ],
- "application/vnd.novadigm.edx": [
- "edx"
- ],
- "application/vnd.novadigm.ext": [
- "ext"
- ],
- "application/vnd.ntt-local.file-transfer": [],
- "application/vnd.ntt-local.sip-ta_remote": [],
- "application/vnd.ntt-local.sip-ta_tcp_stream": [],
- "application/vnd.oasis.opendocument.chart": [
- "odc"
- ],
- "application/vnd.oasis.opendocument.chart-template": [
- "otc"
- ],
- "application/vnd.oasis.opendocument.database": [
- "odb"
- ],
- "application/vnd.oasis.opendocument.formula": [
- "odf"
- ],
- "application/vnd.oasis.opendocument.formula-template": [
- "odft"
- ],
- "application/vnd.oasis.opendocument.graphics": [
- "odg"
- ],
- "application/vnd.oasis.opendocument.graphics-template": [
- "otg"
- ],
- "application/vnd.oasis.opendocument.image": [
- "odi"
- ],
- "application/vnd.oasis.opendocument.image-template": [
- "oti"
- ],
- "application/vnd.oasis.opendocument.presentation": [
- "odp"
- ],
- "application/vnd.oasis.opendocument.presentation-template": [
- "otp"
- ],
- "application/vnd.oasis.opendocument.spreadsheet": [
- "ods"
- ],
- "application/vnd.oasis.opendocument.spreadsheet-template": [
- "ots"
- ],
- "application/vnd.oasis.opendocument.text": [
- "odt"
- ],
- "application/vnd.oasis.opendocument.text-master": [
- "odm"
- ],
- "application/vnd.oasis.opendocument.text-template": [
- "ott"
- ],
- "application/vnd.oasis.opendocument.text-web": [
- "oth"
- ],
- "application/vnd.obn": [],
- "application/vnd.oftn.l10n+json": [],
- "application/vnd.oipf.contentaccessdownload+xml": [],
- "application/vnd.oipf.contentaccessstreaming+xml": [],
- "application/vnd.oipf.cspg-hexbinary": [],
- "application/vnd.oipf.dae.svg+xml": [],
- "application/vnd.oipf.dae.xhtml+xml": [],
- "application/vnd.oipf.mippvcontrolmessage+xml": [],
- "application/vnd.oipf.pae.gem": [],
- "application/vnd.oipf.spdiscovery+xml": [],
- "application/vnd.oipf.spdlist+xml": [],
- "application/vnd.oipf.ueprofile+xml": [],
- "application/vnd.oipf.userprofile+xml": [],
- "application/vnd.olpc-sugar": [
- "xo"
- ],
- "application/vnd.oma-scws-config": [],
- "application/vnd.oma-scws-http-request": [],
- "application/vnd.oma-scws-http-response": [],
- "application/vnd.oma.bcast.associated-procedure-parameter+xml": [],
- "application/vnd.oma.bcast.drm-trigger+xml": [],
- "application/vnd.oma.bcast.imd+xml": [],
- "application/vnd.oma.bcast.ltkm": [],
- "application/vnd.oma.bcast.notification+xml": [],
- "application/vnd.oma.bcast.provisioningtrigger": [],
- "application/vnd.oma.bcast.sgboot": [],
- "application/vnd.oma.bcast.sgdd+xml": [],
- "application/vnd.oma.bcast.sgdu": [],
- "application/vnd.oma.bcast.simple-symbol-container": [],
- "application/vnd.oma.bcast.smartcard-trigger+xml": [],
- "application/vnd.oma.bcast.sprov+xml": [],
- "application/vnd.oma.bcast.stkm": [],
- "application/vnd.oma.cab-address-book+xml": [],
- "application/vnd.oma.cab-feature-handler+xml": [],
- "application/vnd.oma.cab-pcc+xml": [],
- "application/vnd.oma.cab-user-prefs+xml": [],
- "application/vnd.oma.dcd": [],
- "application/vnd.oma.dcdc": [],
- "application/vnd.oma.dd2+xml": [
- "dd2"
- ],
- "application/vnd.oma.drm.risd+xml": [],
- "application/vnd.oma.group-usage-list+xml": [],
- "application/vnd.oma.pal+xml": [],
- "application/vnd.oma.poc.detailed-progress-report+xml": [],
- "application/vnd.oma.poc.final-report+xml": [],
- "application/vnd.oma.poc.groups+xml": [],
- "application/vnd.oma.poc.invocation-descriptor+xml": [],
- "application/vnd.oma.poc.optimized-progress-report+xml": [],
- "application/vnd.oma.push": [],
- "application/vnd.oma.scidm.messages+xml": [],
- "application/vnd.oma.xcap-directory+xml": [],
- "application/vnd.omads-email+xml": [],
- "application/vnd.omads-file+xml": [],
- "application/vnd.omads-folder+xml": [],
- "application/vnd.omaloc-supl-init": [],
- "application/vnd.openofficeorg.extension": [
- "oxt"
- ],
- "application/vnd.openxmlformats-officedocument.custom-properties+xml": [],
- "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": [],
- "application/vnd.openxmlformats-officedocument.drawing+xml": [],
- "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": [],
- "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": [],
- "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": [],
- "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": [],
- "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": [],
- "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": [],
- "application/vnd.openxmlformats-officedocument.extended-properties+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.presentation": [
- "pptx"
- ],
- "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.slide": [
- "sldx"
- ],
- "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.slideshow": [
- "ppsx"
- ],
- "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.template": [
- "potx"
- ],
- "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": [],
- "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [
- "xlsx"
- ],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.template": [
- "xltx"
- ],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": [],
- "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": [],
- "application/vnd.openxmlformats-officedocument.theme+xml": [],
- "application/vnd.openxmlformats-officedocument.themeoverride+xml": [],
- "application/vnd.openxmlformats-officedocument.vmldrawing": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document": [
- "docx"
- ],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.template": [
- "dotx"
- ],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": [],
- "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": [],
- "application/vnd.openxmlformats-package.core-properties+xml": [],
- "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": [],
- "application/vnd.openxmlformats-package.relationships+xml": [],
- "application/vnd.quobject-quoxdocument": [],
- "application/vnd.osa.netdeploy": [],
- "application/vnd.osgeo.mapguide.package": [
- "mgp"
- ],
- "application/vnd.osgi.bundle": [],
- "application/vnd.osgi.dp": [
- "dp"
- ],
- "application/vnd.osgi.subsystem": [
- "esa"
- ],
- "application/vnd.otps.ct-kip+xml": [],
- "application/vnd.palm": [
- "pdb",
- "pqa",
- "oprc"
- ],
- "application/vnd.paos.xml": [],
- "application/vnd.pawaafile": [
- "paw"
- ],
- "application/vnd.pg.format": [
- "str"
- ],
- "application/vnd.pg.osasli": [
- "ei6"
- ],
- "application/vnd.piaccess.application-licence": [],
- "application/vnd.picsel": [
- "efif"
- ],
- "application/vnd.pmi.widget": [
- "wg"
- ],
- "application/vnd.poc.group-advertisement+xml": [],
- "application/vnd.pocketlearn": [
- "plf"
- ],
- "application/vnd.powerbuilder6": [
- "pbd"
- ],
- "application/vnd.powerbuilder6-s": [],
- "application/vnd.powerbuilder7": [],
- "application/vnd.powerbuilder7-s": [],
- "application/vnd.powerbuilder75": [],
- "application/vnd.powerbuilder75-s": [],
- "application/vnd.preminet": [],
- "application/vnd.previewsystems.box": [
- "box"
- ],
- "application/vnd.proteus.magazine": [
- "mgz"
- ],
- "application/vnd.publishare-delta-tree": [
- "qps"
- ],
- "application/vnd.pvi.ptid1": [
- "ptid"
- ],
- "application/vnd.pwg-multiplexed": [],
- "application/vnd.pwg-xhtml-print+xml": [],
- "application/vnd.qualcomm.brew-app-res": [],
- "application/vnd.quark.quarkxpress": [
- "qxd",
- "qxt",
- "qwd",
- "qwt",
- "qxl",
- "qxb"
- ],
- "application/vnd.radisys.moml+xml": [],
- "application/vnd.radisys.msml+xml": [],
- "application/vnd.radisys.msml-audit+xml": [],
- "application/vnd.radisys.msml-audit-conf+xml": [],
- "application/vnd.radisys.msml-audit-conn+xml": [],
- "application/vnd.radisys.msml-audit-dialog+xml": [],
- "application/vnd.radisys.msml-audit-stream+xml": [],
- "application/vnd.radisys.msml-conf+xml": [],
- "application/vnd.radisys.msml-dialog+xml": [],
- "application/vnd.radisys.msml-dialog-base+xml": [],
- "application/vnd.radisys.msml-dialog-fax-detect+xml": [],
- "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": [],
- "application/vnd.radisys.msml-dialog-group+xml": [],
- "application/vnd.radisys.msml-dialog-speech+xml": [],
- "application/vnd.radisys.msml-dialog-transform+xml": [],
- "application/vnd.rainstor.data": [],
- "application/vnd.rapid": [],
- "application/vnd.realvnc.bed": [
- "bed"
- ],
- "application/vnd.recordare.musicxml": [
- "mxl"
- ],
- "application/vnd.recordare.musicxml+xml": [
- "musicxml"
- ],
- "application/vnd.renlearn.rlprint": [],
- "application/vnd.rig.cryptonote": [
- "cryptonote"
- ],
- "application/vnd.rim.cod": [
- "cod"
- ],
- "application/vnd.rn-realmedia": [
- "rm"
- ],
- "application/vnd.rn-realmedia-vbr": [
- "rmvb"
- ],
- "application/vnd.route66.link66+xml": [
- "link66"
- ],
- "application/vnd.rs-274x": [],
- "application/vnd.ruckus.download": [],
- "application/vnd.s3sms": [],
- "application/vnd.sailingtracker.track": [
- "st"
- ],
- "application/vnd.sbm.cid": [],
- "application/vnd.sbm.mid2": [],
- "application/vnd.scribus": [],
- "application/vnd.sealed.3df": [],
- "application/vnd.sealed.csf": [],
- "application/vnd.sealed.doc": [],
- "application/vnd.sealed.eml": [],
- "application/vnd.sealed.mht": [],
- "application/vnd.sealed.net": [],
- "application/vnd.sealed.ppt": [],
- "application/vnd.sealed.tiff": [],
- "application/vnd.sealed.xls": [],
- "application/vnd.sealedmedia.softseal.html": [],
- "application/vnd.sealedmedia.softseal.pdf": [],
- "application/vnd.seemail": [
- "see"
- ],
- "application/vnd.sema": [
- "sema"
- ],
- "application/vnd.semd": [
- "semd"
- ],
- "application/vnd.semf": [
- "semf"
- ],
- "application/vnd.shana.informed.formdata": [
- "ifm"
- ],
- "application/vnd.shana.informed.formtemplate": [
- "itp"
- ],
- "application/vnd.shana.informed.interchange": [
- "iif"
- ],
- "application/vnd.shana.informed.package": [
- "ipk"
- ],
- "application/vnd.simtech-mindmapper": [
- "twd",
- "twds"
- ],
- "application/vnd.smaf": [
- "mmf"
- ],
- "application/vnd.smart.notebook": [],
- "application/vnd.smart.teacher": [
- "teacher"
- ],
- "application/vnd.software602.filler.form+xml": [],
- "application/vnd.software602.filler.form-xml-zip": [],
- "application/vnd.solent.sdkm+xml": [
- "sdkm",
- "sdkd"
- ],
- "application/vnd.spotfire.dxp": [
- "dxp"
- ],
- "application/vnd.spotfire.sfs": [
- "sfs"
- ],
- "application/vnd.sss-cod": [],
- "application/vnd.sss-dtf": [],
- "application/vnd.sss-ntf": [],
- "application/vnd.stardivision.calc": [
- "sdc"
- ],
- "application/vnd.stardivision.draw": [
- "sda"
- ],
- "application/vnd.stardivision.impress": [
- "sdd"
- ],
- "application/vnd.stardivision.math": [
- "smf"
- ],
- "application/vnd.stardivision.writer": [
- "sdw",
- "vor"
- ],
- "application/vnd.stardivision.writer-global": [
- "sgl"
- ],
- "application/vnd.stepmania.package": [
- "smzip"
- ],
- "application/vnd.stepmania.stepchart": [
- "sm"
- ],
- "application/vnd.street-stream": [],
- "application/vnd.sun.xml.calc": [
- "sxc"
- ],
- "application/vnd.sun.xml.calc.template": [
- "stc"
- ],
- "application/vnd.sun.xml.draw": [
- "sxd"
- ],
- "application/vnd.sun.xml.draw.template": [
- "std"
- ],
- "application/vnd.sun.xml.impress": [
- "sxi"
- ],
- "application/vnd.sun.xml.impress.template": [
- "sti"
- ],
- "application/vnd.sun.xml.math": [
- "sxm"
- ],
- "application/vnd.sun.xml.writer": [
- "sxw"
- ],
- "application/vnd.sun.xml.writer.global": [
- "sxg"
- ],
- "application/vnd.sun.xml.writer.template": [
- "stw"
- ],
- "application/vnd.sun.wadl+xml": [],
- "application/vnd.sus-calendar": [
- "sus",
- "susp"
- ],
- "application/vnd.svd": [
- "svd"
- ],
- "application/vnd.swiftview-ics": [],
- "application/vnd.symbian.install": [
- "sis",
- "sisx"
- ],
- "application/vnd.syncml+xml": [
- "xsm"
- ],
- "application/vnd.syncml.dm+wbxml": [
- "bdm"
- ],
- "application/vnd.syncml.dm+xml": [
- "xdm"
- ],
- "application/vnd.syncml.dm.notification": [],
- "application/vnd.syncml.ds.notification": [],
- "application/vnd.tao.intent-module-archive": [
- "tao"
- ],
- "application/vnd.tcpdump.pcap": [
- "pcap",
- "cap",
- "dmp"
- ],
- "application/vnd.tmobile-livetv": [
- "tmo"
- ],
- "application/vnd.trid.tpt": [
- "tpt"
- ],
- "application/vnd.triscape.mxs": [
- "mxs"
- ],
- "application/vnd.trueapp": [
- "tra"
- ],
- "application/vnd.truedoc": [],
- "application/vnd.ubisoft.webplayer": [],
- "application/vnd.ufdl": [
- "ufd",
- "ufdl"
- ],
- "application/vnd.uiq.theme": [
- "utz"
- ],
- "application/vnd.umajin": [
- "umj"
- ],
- "application/vnd.unity": [
- "unityweb"
- ],
- "application/vnd.uoml+xml": [
- "uoml"
- ],
- "application/vnd.uplanet.alert": [],
- "application/vnd.uplanet.alert-wbxml": [],
- "application/vnd.uplanet.bearer-choice": [],
- "application/vnd.uplanet.bearer-choice-wbxml": [],
- "application/vnd.uplanet.cacheop": [],
- "application/vnd.uplanet.cacheop-wbxml": [],
- "application/vnd.uplanet.channel": [],
- "application/vnd.uplanet.channel-wbxml": [],
- "application/vnd.uplanet.list": [],
- "application/vnd.uplanet.list-wbxml": [],
- "application/vnd.uplanet.listcmd": [],
- "application/vnd.uplanet.listcmd-wbxml": [],
- "application/vnd.uplanet.signal": [],
- "application/vnd.vcx": [
- "vcx"
- ],
- "application/vnd.vd-study": [],
- "application/vnd.vectorworks": [],
- "application/vnd.verimatrix.vcas": [],
- "application/vnd.vidsoft.vidconference": [],
- "application/vnd.visio": [
- "vsd",
- "vst",
- "vss",
- "vsw"
- ],
- "application/vnd.visionary": [
- "vis"
- ],
- "application/vnd.vividence.scriptfile": [],
- "application/vnd.vsf": [
- "vsf"
- ],
- "application/vnd.wap.sic": [],
- "application/vnd.wap.slc": [],
- "application/vnd.wap.wbxml": [
- "wbxml"
- ],
- "application/vnd.wap.wmlc": [
- "wmlc"
- ],
- "application/vnd.wap.wmlscriptc": [
- "wmlsc"
- ],
- "application/vnd.webturbo": [
- "wtb"
- ],
- "application/vnd.wfa.wsc": [],
- "application/vnd.wmc": [],
- "application/vnd.wmf.bootstrap": [],
- "application/vnd.wolfram.mathematica": [],
- "application/vnd.wolfram.mathematica.package": [],
- "application/vnd.wolfram.player": [
- "nbp"
- ],
- "application/vnd.wordperfect": [
- "wpd"
- ],
- "application/vnd.wqd": [
- "wqd"
- ],
- "application/vnd.wrq-hp3000-labelled": [],
- "application/vnd.wt.stf": [
- "stf"
- ],
- "application/vnd.wv.csp+wbxml": [],
- "application/vnd.wv.csp+xml": [],
- "application/vnd.wv.ssp+xml": [],
- "application/vnd.xara": [
- "xar"
- ],
- "application/vnd.xfdl": [
- "xfdl"
- ],
- "application/vnd.xfdl.webform": [],
- "application/vnd.xmi+xml": [],
- "application/vnd.xmpie.cpkg": [],
- "application/vnd.xmpie.dpkg": [],
- "application/vnd.xmpie.plan": [],
- "application/vnd.xmpie.ppkg": [],
- "application/vnd.xmpie.xlim": [],
- "application/vnd.yamaha.hv-dic": [
- "hvd"
- ],
- "application/vnd.yamaha.hv-script": [
- "hvs"
- ],
- "application/vnd.yamaha.hv-voice": [
- "hvp"
- ],
- "application/vnd.yamaha.openscoreformat": [
- "osf"
- ],
- "application/vnd.yamaha.openscoreformat.osfpvg+xml": [
- "osfpvg"
- ],
- "application/vnd.yamaha.remote-setup": [],
- "application/vnd.yamaha.smaf-audio": [
- "saf"
- ],
- "application/vnd.yamaha.smaf-phrase": [
- "spf"
- ],
- "application/vnd.yamaha.through-ngn": [],
- "application/vnd.yamaha.tunnel-udpencap": [],
- "application/vnd.yellowriver-custom-menu": [
- "cmp"
- ],
- "application/vnd.zul": [
- "zir",
- "zirz"
- ],
- "application/vnd.zzazz.deck+xml": [
- "zaz"
- ],
- "application/voicexml+xml": [
- "vxml"
- ],
- "application/vq-rtcpxr": [],
- "application/watcherinfo+xml": [],
- "application/whoispp-query": [],
- "application/whoispp-response": [],
- "application/widget": [
- "wgt"
- ],
- "application/winhlp": [
- "hlp"
- ],
- "application/wita": [],
- "application/wordperfect5.1": [],
- "application/wsdl+xml": [
- "wsdl"
- ],
- "application/wspolicy+xml": [
- "wspolicy"
- ],
- "application/x-7z-compressed": [
- "7z"
- ],
- "application/x-abiword": [
- "abw"
- ],
- "application/x-ace-compressed": [
- "ace"
- ],
- "application/x-amf": [],
- "application/x-apple-diskimage": [
- "dmg"
- ],
- "application/x-authorware-bin": [
- "aab",
- "x32",
- "u32",
- "vox"
- ],
- "application/x-authorware-map": [
- "aam"
- ],
- "application/x-authorware-seg": [
- "aas"
- ],
- "application/x-bcpio": [
- "bcpio"
- ],
- "application/x-bittorrent": [
- "torrent"
- ],
- "application/x-blorb": [
- "blb",
- "blorb"
- ],
- "application/x-bzip": [
- "bz"
- ],
- "application/x-bzip2": [
- "bz2",
- "boz"
- ],
- "application/x-cbr": [
- "cbr",
- "cba",
- "cbt",
- "cbz",
- "cb7"
- ],
- "application/x-cdlink": [
- "vcd"
- ],
- "application/x-cfs-compressed": [
- "cfs"
- ],
- "application/x-chat": [
- "chat"
- ],
- "application/x-chess-pgn": [
- "pgn"
- ],
- "application/x-conference": [
- "nsc"
- ],
- "application/x-compress": [],
- "application/x-cpio": [
- "cpio"
- ],
- "application/x-csh": [
- "csh"
- ],
- "application/x-debian-package": [
- "deb",
- "udeb"
- ],
- "application/x-dgc-compressed": [
- "dgc"
- ],
- "application/x-director": [
- "dir",
- "dcr",
- "dxr",
- "cst",
- "cct",
- "cxt",
- "w3d",
- "fgd",
- "swa"
- ],
- "application/x-doom": [
- "wad"
- ],
- "application/x-dtbncx+xml": [
- "ncx"
- ],
- "application/x-dtbook+xml": [
- "dtb"
- ],
- "application/x-dtbresource+xml": [
- "res"
- ],
- "application/x-dvi": [
- "dvi"
- ],
- "application/x-envoy": [
- "evy"
- ],
- "application/x-eva": [
- "eva"
- ],
- "application/x-font-bdf": [
- "bdf"
- ],
- "application/x-font-dos": [],
- "application/x-font-framemaker": [],
- "application/x-font-ghostscript": [
- "gsf"
- ],
- "application/x-font-libgrx": [],
- "application/x-font-linux-psf": [
- "psf"
- ],
- "application/x-font-otf": [
- "otf"
- ],
- "application/x-font-pcf": [
- "pcf"
- ],
- "application/x-font-snf": [
- "snf"
- ],
- "application/x-font-speedo": [],
- "application/x-font-sunos-news": [],
- "application/x-font-ttf": [
- "ttf",
- "ttc"
- ],
- "application/x-font-type1": [
- "pfa",
- "pfb",
- "pfm",
- "afm"
- ],
- "application/font-woff": [
- "woff"
- ],
- "application/x-font-vfont": [],
- "application/x-freearc": [
- "arc"
- ],
- "application/x-futuresplash": [
- "spl"
- ],
- "application/x-gca-compressed": [
- "gca"
- ],
- "application/x-glulx": [
- "ulx"
- ],
- "application/x-gnumeric": [
- "gnumeric"
- ],
- "application/x-gramps-xml": [
- "gramps"
- ],
- "application/x-gtar": [
- "gtar"
- ],
- "application/x-gzip": [],
- "application/x-hdf": [
- "hdf"
- ],
- "application/x-install-instructions": [
- "install"
- ],
- "application/x-iso9660-image": [
- "iso"
- ],
- "application/x-java-jnlp-file": [
- "jnlp"
- ],
- "application/x-latex": [
- "latex"
- ],
- "application/x-lzh-compressed": [
- "lzh",
- "lha"
- ],
- "application/x-mie": [
- "mie"
- ],
- "application/x-mobipocket-ebook": [
- "prc",
- "mobi"
- ],
- "application/x-ms-application": [
- "application"
- ],
- "application/x-ms-shortcut": [
- "lnk"
- ],
- "application/x-ms-wmd": [
- "wmd"
- ],
- "application/x-ms-wmz": [
- "wmz"
- ],
- "application/x-ms-xbap": [
- "xbap"
- ],
- "application/x-msaccess": [
- "mdb"
- ],
- "application/x-msbinder": [
- "obd"
- ],
- "application/x-mscardfile": [
- "crd"
- ],
- "application/x-msclip": [
- "clp"
- ],
- "application/x-msdownload": [
- "exe",
- "dll",
- "com",
- "bat",
- "msi"
- ],
- "application/x-msmediaview": [
- "mvb",
- "m13",
- "m14"
- ],
- "application/x-msmetafile": [
- "wmf",
- "wmz",
- "emf",
- "emz"
- ],
- "application/x-msmoney": [
- "mny"
- ],
- "application/x-mspublisher": [
- "pub"
- ],
- "application/x-msschedule": [
- "scd"
- ],
- "application/x-msterminal": [
- "trm"
- ],
- "application/x-mswrite": [
- "wri"
- ],
- "application/x-netcdf": [
- "nc",
- "cdf"
- ],
- "application/x-nzb": [
- "nzb"
- ],
- "application/x-pkcs12": [
- "p12",
- "pfx"
- ],
- "application/x-pkcs7-certificates": [
- "p7b",
- "spc"
- ],
- "application/x-pkcs7-certreqresp": [
- "p7r"
- ],
- "application/x-rar-compressed": [
- "rar"
- ],
- "application/x-research-info-systems": [
- "ris"
- ],
- "application/x-sh": [
- "sh"
- ],
- "application/x-shar": [
- "shar"
- ],
- "application/x-shockwave-flash": [
- "swf"
- ],
- "application/x-silverlight-app": [
- "xap"
- ],
- "application/x-sql": [
- "sql"
- ],
- "application/x-stuffit": [
- "sit"
- ],
- "application/x-stuffitx": [
- "sitx"
- ],
- "application/x-subrip": [
- "srt"
- ],
- "application/x-sv4cpio": [
- "sv4cpio"
- ],
- "application/x-sv4crc": [
- "sv4crc"
- ],
- "application/x-t3vm-image": [
- "t3"
- ],
- "application/x-tads": [
- "gam"
- ],
- "application/x-tar": [
- "tar"
- ],
- "application/x-tcl": [
- "tcl"
- ],
- "application/x-tex": [
- "tex"
- ],
- "application/x-tex-tfm": [
- "tfm"
- ],
- "application/x-texinfo": [
- "texinfo",
- "texi"
- ],
- "application/x-tgif": [
- "obj"
- ],
- "application/x-ustar": [
- "ustar"
- ],
- "application/x-wais-source": [
- "src"
- ],
- "application/x-x509-ca-cert": [
- "der",
- "crt"
- ],
- "application/x-xfig": [
- "fig"
- ],
- "application/x-xliff+xml": [
- "xlf"
- ],
- "application/x-xpinstall": [
- "xpi"
- ],
- "application/x-xz": [
- "xz"
- ],
- "application/x-zmachine": [
- "z1",
- "z2",
- "z3",
- "z4",
- "z5",
- "z6",
- "z7",
- "z8"
- ],
- "application/x400-bp": [],
- "application/xaml+xml": [
- "xaml"
- ],
- "application/xcap-att+xml": [],
- "application/xcap-caps+xml": [],
- "application/xcap-diff+xml": [
- "xdf"
- ],
- "application/xcap-el+xml": [],
- "application/xcap-error+xml": [],
- "application/xcap-ns+xml": [],
- "application/xcon-conference-info-diff+xml": [],
- "application/xcon-conference-info+xml": [],
- "application/xenc+xml": [
- "xenc"
- ],
- "application/xhtml+xml": [
- "xhtml",
- "xht"
- ],
- "application/xhtml-voice+xml": [],
- "application/xml": [
- "xml",
- "xsl"
- ],
- "application/xml-dtd": [
- "dtd"
- ],
- "application/xml-external-parsed-entity": [],
- "application/xmpp+xml": [],
- "application/xop+xml": [
- "xop"
- ],
- "application/xproc+xml": [
- "xpl"
- ],
- "application/xslt+xml": [
- "xslt"
- ],
- "application/xspf+xml": [
- "xspf"
- ],
- "application/xv+xml": [
- "mxml",
- "xhvml",
- "xvml",
- "xvm"
- ],
- "application/yang": [
- "yang"
- ],
- "application/yin+xml": [
- "yin"
- ],
- "application/zip": [
- "zip"
- ],
- "audio/1d-interleaved-parityfec": [],
- "audio/32kadpcm": [],
- "audio/3gpp": [],
- "audio/3gpp2": [],
- "audio/ac3": [],
- "audio/adpcm": [
- "adp"
- ],
- "audio/amr": [],
- "audio/amr-wb": [],
- "audio/amr-wb+": [],
- "audio/asc": [],
- "audio/atrac-advanced-lossless": [],
- "audio/atrac-x": [],
- "audio/atrac3": [],
- "audio/basic": [
- "au",
- "snd"
- ],
- "audio/bv16": [],
- "audio/bv32": [],
- "audio/clearmode": [],
- "audio/cn": [],
- "audio/dat12": [],
- "audio/dls": [],
- "audio/dsr-es201108": [],
- "audio/dsr-es202050": [],
- "audio/dsr-es202211": [],
- "audio/dsr-es202212": [],
- "audio/dv": [],
- "audio/dvi4": [],
- "audio/eac3": [],
- "audio/evrc": [],
- "audio/evrc-qcp": [],
- "audio/evrc0": [],
- "audio/evrc1": [],
- "audio/evrcb": [],
- "audio/evrcb0": [],
- "audio/evrcb1": [],
- "audio/evrcwb": [],
- "audio/evrcwb0": [],
- "audio/evrcwb1": [],
- "audio/example": [],
- "audio/fwdred": [],
- "audio/g719": [],
- "audio/g722": [],
- "audio/g7221": [],
- "audio/g723": [],
- "audio/g726-16": [],
- "audio/g726-24": [],
- "audio/g726-32": [],
- "audio/g726-40": [],
- "audio/g728": [],
- "audio/g729": [],
- "audio/g7291": [],
- "audio/g729d": [],
- "audio/g729e": [],
- "audio/gsm": [],
- "audio/gsm-efr": [],
- "audio/gsm-hr-08": [],
- "audio/ilbc": [],
- "audio/ip-mr_v2.5": [],
- "audio/isac": [],
- "audio/l16": [],
- "audio/l20": [],
- "audio/l24": [],
- "audio/l8": [],
- "audio/lpc": [],
- "audio/midi": [
- "mid",
- "midi",
- "kar",
- "rmi"
- ],
- "audio/mobile-xmf": [],
- "audio/mp4": [
- "mp4a"
- ],
- "audio/mp4a-latm": [],
- "audio/mpa": [],
- "audio/mpa-robust": [],
- "audio/mpeg": [
- "mpga",
- "mp2",
- "mp2a",
- "mp3",
- "m2a",
- "m3a"
- ],
- "audio/mpeg4-generic": [],
- "audio/musepack": [],
- "audio/ogg": [
- "oga",
- "ogg",
- "spx"
- ],
- "audio/opus": [],
- "audio/parityfec": [],
- "audio/pcma": [],
- "audio/pcma-wb": [],
- "audio/pcmu-wb": [],
- "audio/pcmu": [],
- "audio/prs.sid": [],
- "audio/qcelp": [],
- "audio/red": [],
- "audio/rtp-enc-aescm128": [],
- "audio/rtp-midi": [],
- "audio/rtx": [],
- "audio/s3m": [
- "s3m"
- ],
- "audio/silk": [
- "sil"
- ],
- "audio/smv": [],
- "audio/smv0": [],
- "audio/smv-qcp": [],
- "audio/sp-midi": [],
- "audio/speex": [],
- "audio/t140c": [],
- "audio/t38": [],
- "audio/telephone-event": [],
- "audio/tone": [],
- "audio/uemclip": [],
- "audio/ulpfec": [],
- "audio/vdvi": [],
- "audio/vmr-wb": [],
- "audio/vnd.3gpp.iufp": [],
- "audio/vnd.4sb": [],
- "audio/vnd.audiokoz": [],
- "audio/vnd.celp": [],
- "audio/vnd.cisco.nse": [],
- "audio/vnd.cmles.radio-events": [],
- "audio/vnd.cns.anp1": [],
- "audio/vnd.cns.inf1": [],
- "audio/vnd.dece.audio": [
- "uva",
- "uvva"
- ],
- "audio/vnd.digital-winds": [
- "eol"
- ],
- "audio/vnd.dlna.adts": [],
- "audio/vnd.dolby.heaac.1": [],
- "audio/vnd.dolby.heaac.2": [],
- "audio/vnd.dolby.mlp": [],
- "audio/vnd.dolby.mps": [],
- "audio/vnd.dolby.pl2": [],
- "audio/vnd.dolby.pl2x": [],
- "audio/vnd.dolby.pl2z": [],
- "audio/vnd.dolby.pulse.1": [],
- "audio/vnd.dra": [
- "dra"
- ],
- "audio/vnd.dts": [
- "dts"
- ],
- "audio/vnd.dts.hd": [
- "dtshd"
- ],
- "audio/vnd.dvb.file": [],
- "audio/vnd.everad.plj": [],
- "audio/vnd.hns.audio": [],
- "audio/vnd.lucent.voice": [
- "lvp"
- ],
- "audio/vnd.ms-playready.media.pya": [
- "pya"
- ],
- "audio/vnd.nokia.mobile-xmf": [],
- "audio/vnd.nortel.vbk": [],
- "audio/vnd.nuera.ecelp4800": [
- "ecelp4800"
- ],
- "audio/vnd.nuera.ecelp7470": [
- "ecelp7470"
- ],
- "audio/vnd.nuera.ecelp9600": [
- "ecelp9600"
- ],
- "audio/vnd.octel.sbc": [],
- "audio/vnd.qcelp": [],
- "audio/vnd.rhetorex.32kadpcm": [],
- "audio/vnd.rip": [
- "rip"
- ],
- "audio/vnd.sealedmedia.softseal.mpeg": [],
- "audio/vnd.vmx.cvsd": [],
- "audio/vorbis": [],
- "audio/vorbis-config": [],
- "audio/webm": [
- "weba"
- ],
- "audio/x-aac": [
- "aac"
- ],
- "audio/x-aiff": [
- "aif",
- "aiff",
- "aifc"
- ],
- "audio/x-caf": [
- "caf"
- ],
- "audio/x-flac": [
- "flac"
- ],
- "audio/x-matroska": [
- "mka"
- ],
- "audio/x-mpegurl": [
- "m3u"
- ],
- "audio/x-ms-wax": [
- "wax"
- ],
- "audio/x-ms-wma": [
- "wma"
- ],
- "audio/x-pn-realaudio": [
- "ram",
- "ra"
- ],
- "audio/x-pn-realaudio-plugin": [
- "rmp"
- ],
- "audio/x-tta": [],
- "audio/x-wav": [
- "wav"
- ],
- "audio/xm": [
- "xm"
- ],
- "chemical/x-cdx": [
- "cdx"
- ],
- "chemical/x-cif": [
- "cif"
- ],
- "chemical/x-cmdf": [
- "cmdf"
- ],
- "chemical/x-cml": [
- "cml"
- ],
- "chemical/x-csml": [
- "csml"
- ],
- "chemical/x-pdb": [],
- "chemical/x-xyz": [
- "xyz"
- ],
- "image/bmp": [
- "bmp"
- ],
- "image/cgm": [
- "cgm"
- ],
- "image/example": [],
- "image/fits": [],
- "image/g3fax": [
- "g3"
- ],
- "image/gif": [
- "gif"
- ],
- "image/ief": [
- "ief"
- ],
- "image/jp2": [],
- "image/jpeg": [
- "jpeg",
- "jpg",
- "jpe"
- ],
- "image/jpm": [],
- "image/jpx": [],
- "image/ktx": [
- "ktx"
- ],
- "image/naplps": [],
- "image/png": [
- "png"
- ],
- "image/prs.btif": [
- "btif"
- ],
- "image/prs.pti": [],
- "image/sgi": [
- "sgi"
- ],
- "image/svg+xml": [
- "svg",
- "svgz"
- ],
- "image/t38": [],
- "image/tiff": [
- "tiff",
- "tif"
- ],
- "image/tiff-fx": [],
- "image/vnd.adobe.photoshop": [
- "psd"
- ],
- "image/vnd.cns.inf2": [],
- "image/vnd.dece.graphic": [
- "uvi",
- "uvvi",
- "uvg",
- "uvvg"
- ],
- "image/vnd.dvb.subtitle": [
- "sub"
- ],
- "image/vnd.djvu": [
- "djvu",
- "djv"
- ],
- "image/vnd.dwg": [
- "dwg"
- ],
- "image/vnd.dxf": [
- "dxf"
- ],
- "image/vnd.fastbidsheet": [
- "fbs"
- ],
- "image/vnd.fpx": [
- "fpx"
- ],
- "image/vnd.fst": [
- "fst"
- ],
- "image/vnd.fujixerox.edmics-mmr": [
- "mmr"
- ],
- "image/vnd.fujixerox.edmics-rlc": [
- "rlc"
- ],
- "image/vnd.globalgraphics.pgb": [],
- "image/vnd.microsoft.icon": [],
- "image/vnd.mix": [],
- "image/vnd.ms-modi": [
- "mdi"
- ],
- "image/vnd.ms-photo": [
- "wdp"
- ],
- "image/vnd.net-fpx": [
- "npx"
- ],
- "image/vnd.radiance": [],
- "image/vnd.sealed.png": [],
- "image/vnd.sealedmedia.softseal.gif": [],
- "image/vnd.sealedmedia.softseal.jpg": [],
- "image/vnd.svf": [],
- "image/vnd.wap.wbmp": [
- "wbmp"
- ],
- "image/vnd.xiff": [
- "xif"
- ],
- "image/webp": [
- "webp"
- ],
- "image/x-3ds": [
- "3ds"
- ],
- "image/x-cmu-raster": [
- "ras"
- ],
- "image/x-cmx": [
- "cmx"
- ],
- "image/x-freehand": [
- "fh",
- "fhc",
- "fh4",
- "fh5",
- "fh7"
- ],
- "image/x-icon": [
- "ico"
- ],
- "image/x-mrsid-image": [
- "sid"
- ],
- "image/x-pcx": [
- "pcx"
- ],
- "image/x-pict": [
- "pic",
- "pct"
- ],
- "image/x-portable-anymap": [
- "pnm"
- ],
- "image/x-portable-bitmap": [
- "pbm"
- ],
- "image/x-portable-graymap": [
- "pgm"
- ],
- "image/x-portable-pixmap": [
- "ppm"
- ],
- "image/x-rgb": [
- "rgb"
- ],
- "image/x-tga": [
- "tga"
- ],
- "image/x-xbitmap": [
- "xbm"
- ],
- "image/x-xpixmap": [
- "xpm"
- ],
- "image/x-xwindowdump": [
- "xwd"
- ],
- "message/cpim": [],
- "message/delivery-status": [],
- "message/disposition-notification": [],
- "message/example": [],
- "message/external-body": [],
- "message/feedback-report": [],
- "message/global": [],
- "message/global-delivery-status": [],
- "message/global-disposition-notification": [],
- "message/global-headers": [],
- "message/http": [],
- "message/imdn+xml": [],
- "message/news": [],
- "message/partial": [],
- "message/rfc822": [
- "eml",
- "mime"
- ],
- "message/s-http": [],
- "message/sip": [],
- "message/sipfrag": [],
- "message/tracking-status": [],
- "message/vnd.si.simp": [],
- "model/example": [],
- "model/iges": [
- "igs",
- "iges"
- ],
- "model/mesh": [
- "msh",
- "mesh",
- "silo"
- ],
- "model/vnd.collada+xml": [
- "dae"
- ],
- "model/vnd.dwf": [
- "dwf"
- ],
- "model/vnd.flatland.3dml": [],
- "model/vnd.gdl": [
- "gdl"
- ],
- "model/vnd.gs-gdl": [],
- "model/vnd.gs.gdl": [],
- "model/vnd.gtw": [
- "gtw"
- ],
- "model/vnd.moml+xml": [],
- "model/vnd.mts": [
- "mts"
- ],
- "model/vnd.parasolid.transmit.binary": [],
- "model/vnd.parasolid.transmit.text": [],
- "model/vnd.vtu": [
- "vtu"
- ],
- "model/vrml": [
- "wrl",
- "vrml"
- ],
- "model/x3d+binary": [
- "x3db",
- "x3dbz"
- ],
- "model/x3d+vrml": [
- "x3dv",
- "x3dvz"
- ],
- "model/x3d+xml": [
- "x3d",
- "x3dz"
- ],
- "multipart/alternative": [],
- "multipart/appledouble": [],
- "multipart/byteranges": [],
- "multipart/digest": [],
- "multipart/encrypted": [],
- "multipart/example": [],
- "multipart/form-data": [],
- "multipart/header-set": [],
- "multipart/mixed": [],
- "multipart/parallel": [],
- "multipart/related": [],
- "multipart/report": [],
- "multipart/signed": [],
- "multipart/voice-message": [],
- "text/1d-interleaved-parityfec": [],
- "text/cache-manifest": [
- "appcache"
- ],
- "text/calendar": [
- "ics",
- "ifb"
- ],
- "text/css": [
- "css"
- ],
- "text/csv": [
- "csv"
- ],
- "text/directory": [],
- "text/dns": [],
- "text/ecmascript": [],
- "text/enriched": [],
- "text/example": [],
- "text/fwdred": [],
- "text/html": [
- "html",
- "htm"
- ],
- "text/javascript": [],
- "text/n3": [
- "n3"
- ],
- "text/parityfec": [],
- "text/plain": [
- "txt",
- "text",
- "conf",
- "def",
- "list",
- "log",
- "in"
- ],
- "text/prs.fallenstein.rst": [],
- "text/prs.lines.tag": [
- "dsc"
- ],
- "text/vnd.radisys.msml-basic-layout": [],
- "text/red": [],
- "text/rfc822-headers": [],
- "text/richtext": [
- "rtx"
- ],
- "text/rtf": [],
- "text/rtp-enc-aescm128": [],
- "text/rtx": [],
- "text/sgml": [
- "sgml",
- "sgm"
- ],
- "text/t140": [],
- "text/tab-separated-values": [
- "tsv"
- ],
- "text/troff": [
- "t",
- "tr",
- "roff",
- "man",
- "me",
- "ms"
- ],
- "text/turtle": [
- "ttl"
- ],
- "text/ulpfec": [],
- "text/uri-list": [
- "uri",
- "uris",
- "urls"
- ],
- "text/vcard": [
- "vcard"
- ],
- "text/vnd.abc": [],
- "text/vnd.curl": [
- "curl"
- ],
- "text/vnd.curl.dcurl": [
- "dcurl"
- ],
- "text/vnd.curl.scurl": [
- "scurl"
- ],
- "text/vnd.curl.mcurl": [
- "mcurl"
- ],
- "text/vnd.dmclientscript": [],
- "text/vnd.dvb.subtitle": [
- "sub"
- ],
- "text/vnd.esmertec.theme-descriptor": [],
- "text/vnd.fly": [
- "fly"
- ],
- "text/vnd.fmi.flexstor": [
- "flx"
- ],
- "text/vnd.graphviz": [
- "gv"
- ],
- "text/vnd.in3d.3dml": [
- "3dml"
- ],
- "text/vnd.in3d.spot": [
- "spot"
- ],
- "text/vnd.iptc.newsml": [],
- "text/vnd.iptc.nitf": [],
- "text/vnd.latex-z": [],
- "text/vnd.motorola.reflex": [],
- "text/vnd.ms-mediapackage": [],
- "text/vnd.net2phone.commcenter.command": [],
- "text/vnd.si.uricatalogue": [],
- "text/vnd.sun.j2me.app-descriptor": [
- "jad"
- ],
- "text/vnd.trolltech.linguist": [],
- "text/vnd.wap.si": [],
- "text/vnd.wap.sl": [],
- "text/vnd.wap.wml": [
- "wml"
- ],
- "text/vnd.wap.wmlscript": [
- "wmls"
- ],
- "text/x-asm": [
- "s",
- "asm"
- ],
- "text/x-c": [
- "c",
- "cc",
- "cxx",
- "cpp",
- "h",
- "hh",
- "dic"
- ],
- "text/x-fortran": [
- "f",
- "for",
- "f77",
- "f90"
- ],
- "text/x-java-source": [
- "java"
- ],
- "text/x-opml": [
- "opml"
- ],
- "text/x-pascal": [
- "p",
- "pas"
- ],
- "text/x-nfo": [
- "nfo"
- ],
- "text/x-setext": [
- "etx"
- ],
- "text/x-sfv": [
- "sfv"
- ],
- "text/x-uuencode": [
- "uu"
- ],
- "text/x-vcalendar": [
- "vcs"
- ],
- "text/x-vcard": [
- "vcf"
- ],
- "text/xml": [],
- "text/xml-external-parsed-entity": [],
- "video/1d-interleaved-parityfec": [],
- "video/3gpp": [
- "3gp"
- ],
- "video/3gpp-tt": [],
- "video/3gpp2": [
- "3g2"
- ],
- "video/bmpeg": [],
- "video/bt656": [],
- "video/celb": [],
- "video/dv": [],
- "video/example": [],
- "video/h261": [
- "h261"
- ],
- "video/h263": [
- "h263"
- ],
- "video/h263-1998": [],
- "video/h263-2000": [],
- "video/h264": [
- "h264"
- ],
- "video/h264-rcdo": [],
- "video/h264-svc": [],
- "video/jpeg": [
- "jpgv"
- ],
- "video/jpeg2000": [],
- "video/jpm": [
- "jpm",
- "jpgm"
- ],
- "video/mj2": [
- "mj2",
- "mjp2"
- ],
- "video/mp1s": [],
- "video/mp2p": [],
- "video/mp2t": [],
- "video/mp4": [
- "mp4",
- "mp4v",
- "mpg4"
- ],
- "video/mp4v-es": [],
- "video/mpeg": [
- "mpeg",
- "mpg",
- "mpe",
- "m1v",
- "m2v"
- ],
- "video/mpeg4-generic": [],
- "video/mpv": [],
- "video/nv": [],
- "video/ogg": [
- "ogv"
- ],
- "video/parityfec": [],
- "video/pointer": [],
- "video/quicktime": [
- "qt",
- "mov"
- ],
- "video/raw": [],
- "video/rtp-enc-aescm128": [],
- "video/rtx": [],
- "video/smpte292m": [],
- "video/ulpfec": [],
- "video/vc1": [],
- "video/vnd.cctv": [],
- "video/vnd.dece.hd": [
- "uvh",
- "uvvh"
- ],
- "video/vnd.dece.mobile": [
- "uvm",
- "uvvm"
- ],
- "video/vnd.dece.mp4": [],
- "video/vnd.dece.pd": [
- "uvp",
- "uvvp"
- ],
- "video/vnd.dece.sd": [
- "uvs",
- "uvvs"
- ],
- "video/vnd.dece.video": [
- "uvv",
- "uvvv"
- ],
- "video/vnd.directv.mpeg": [],
- "video/vnd.directv.mpeg-tts": [],
- "video/vnd.dlna.mpeg-tts": [],
- "video/vnd.dvb.file": [
- "dvb"
- ],
- "video/vnd.fvt": [
- "fvt"
- ],
- "video/vnd.hns.video": [],
- "video/vnd.iptvforum.1dparityfec-1010": [],
- "video/vnd.iptvforum.1dparityfec-2005": [],
- "video/vnd.iptvforum.2dparityfec-1010": [],
- "video/vnd.iptvforum.2dparityfec-2005": [],
- "video/vnd.iptvforum.ttsavc": [],
- "video/vnd.iptvforum.ttsmpeg2": [],
- "video/vnd.motorola.video": [],
- "video/vnd.motorola.videop": [],
- "video/vnd.mpegurl": [
- "mxu",
- "m4u"
- ],
- "video/vnd.ms-playready.media.pyv": [
- "pyv"
- ],
- "video/vnd.nokia.interleaved-multimedia": [],
- "video/vnd.nokia.videovoip": [],
- "video/vnd.objectvideo": [],
- "video/vnd.sealed.mpeg1": [],
- "video/vnd.sealed.mpeg4": [],
- "video/vnd.sealed.swf": [],
- "video/vnd.sealedmedia.softseal.mov": [],
- "video/vnd.uvvu.mp4": [
- "uvu",
- "uvvu"
- ],
- "video/vnd.vivo": [
- "viv"
- ],
- "video/webm": [
- "webm"
- ],
- "video/x-f4v": [
- "f4v"
- ],
- "video/x-fli": [
- "fli"
- ],
- "video/x-flv": [
- "flv"
- ],
- "video/x-m4v": [
- "m4v"
- ],
- "video/x-matroska": [
- "mkv",
- "mk3d",
- "mks"
- ],
- "video/x-mng": [
- "mng"
- ],
- "video/x-ms-asf": [
- "asf",
- "asx"
- ],
- "video/x-ms-vob": [
- "vob"
- ],
- "video/x-ms-wm": [
- "wm"
- ],
- "video/x-ms-wmv": [
- "wmv"
- ],
- "video/x-ms-wmx": [
- "wmx"
- ],
- "video/x-ms-wvx": [
- "wvx"
- ],
- "video/x-msvideo": [
- "avi"
- ],
- "video/x-sgi-movie": [
- "movie"
- ],
- "video/x-smv": [
- "smv"
- ],
- "x-conference/x-cooltalk": [
- "ice"
- ]
-}
diff --git a/deps/npm/node_modules/request/node_modules/mime-types/lib/node.json b/deps/npm/node_modules/request/node_modules/mime-types/lib/node.json
deleted file mode 100644
index ad50d6134a..0000000000
--- a/deps/npm/node_modules/request/node_modules/mime-types/lib/node.json
+++ /dev/null
@@ -1,55 +0,0 @@
-{
- "text/vtt": [
- "vtt"
- ],
- "application/x-chrome-extension": [
- "crx"
- ],
- "text/x-component": [
- "htc"
- ],
- "text/cache-manifest": [
- "manifest"
- ],
- "application/octet-stream": [
- "buffer"
- ],
- "application/mp4": [
- "m4p"
- ],
- "audio/mp4": [
- "m4a"
- ],
- "video/MP2T": [
- "ts"
- ],
- "application/x-web-app-manifest+json": [
- "webapp"
- ],
- "text/x-lua": [
- "lua"
- ],
- "application/x-lua-bytecode": [
- "luac"
- ],
- "text/x-markdown": [
- "markdown",
- "md",
- "mkd"
- ],
- "text/plain": [
- "ini"
- ],
- "application/dash+xml": [
- "mdp"
- ],
- "font/opentype": [
- "otf"
- ],
- "application/json": [
- "map"
- ],
- "application/xml": [
- "xsd"
- ]
-}
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
new file mode 100644
index 0000000000..bd218ebf4d
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md
@@ -0,0 +1,160 @@
+1.6.1 / 2015-02-05
+==================
+
+ * Community extensions ownership transferred from `node-mime`
+
+1.6.0 / 2015-01-29
+==================
+
+ * Add `application/jose`
+ * Add `application/jose+json`
+ * Add `application/json-seq`
+ * Add `application/jwk+json`
+ * Add `application/jwk-set+json`
+ * Add `application/jwt`
+ * Add `application/rdap+json`
+ * Add `application/vnd.gov.sk.e-form+xml`
+ * Add `application/vnd.ims.imsccv1p3`
+
+1.5.0 / 2014-12-30
+==================
+
+ * Add `application/vnd.oracle.resource+json`
+ * Fix various invalid MIME type entries
+ - `application/mbox+xml`
+ - `application/oscp-response`
+ - `application/vwg-multiplexed`
+ - `audio/g721`
+
+1.4.0 / 2014-12-21
+==================
+
+ * Add `application/vnd.ims.imsccv1p2`
+ * Fix various invalid MIME type entries
+ - `application/vnd-acucobol`
+ - `application/vnd-curl`
+ - `application/vnd-dart`
+ - `application/vnd-dxr`
+ - `application/vnd-fdf`
+ - `application/vnd-mif`
+ - `application/vnd-sema`
+ - `application/vnd-wap-wmlc`
+ - `application/vnd.adobe.flash-movie`
+ - `application/vnd.dece-zip`
+ - `application/vnd.dvb_service`
+ - `application/vnd.micrografx-igx`
+ - `application/vnd.sealed-doc`
+ - `application/vnd.sealed-eml`
+ - `application/vnd.sealed-mht`
+ - `application/vnd.sealed-ppt`
+ - `application/vnd.sealed-tiff`
+ - `application/vnd.sealed-xls`
+ - `application/vnd.sealedmedia.softseal-html`
+ - `application/vnd.sealedmedia.softseal-pdf`
+ - `application/vnd.wap-slc`
+ - `application/vnd.wap-wbxml`
+ - `audio/vnd.sealedmedia.softseal-mpeg`
+ - `image/vnd-djvu`
+ - `image/vnd-svf`
+ - `image/vnd-wap-wbmp`
+ - `image/vnd.sealed-png`
+ - `image/vnd.sealedmedia.softseal-gif`
+ - `image/vnd.sealedmedia.softseal-jpg`
+ - `model/vnd-dwf`
+ - `model/vnd.parasolid.transmit-binary`
+ - `model/vnd.parasolid.transmit-text`
+ - `text/vnd-a`
+ - `text/vnd-curl`
+ - `text/vnd.wap-wml`
+ * Remove example template MIME types
+ - `application/example`
+ - `audio/example`
+ - `image/example`
+ - `message/example`
+ - `model/example`
+ - `multipart/example`
+ - `text/example`
+ - `video/example`
+
+1.3.1 / 2014-12-16
+==================
+
+ * Fix missing extensions
+ - `application/json5`
+ - `text/hjson`
+
+1.3.0 / 2014-12-07
+==================
+
+ * Add `application/a2l`
+ * Add `application/aml`
+ * Add `application/atfx`
+ * Add `application/atxml`
+ * Add `application/cdfx+xml`
+ * Add `application/dii`
+ * Add `application/json5`
+ * Add `application/lxf`
+ * Add `application/mf4`
+ * Add `application/vnd.apache.thrift.compact`
+ * Add `application/vnd.apache.thrift.json`
+ * Add `application/vnd.coffeescript`
+ * Add `application/vnd.enphase.envoy`
+ * Add `application/vnd.ims.imsccv1p1`
+ * Add `text/csv-schema`
+ * Add `text/hjson`
+ * Add `text/markdown`
+ * Add `text/yaml`
+
+1.2.0 / 2014-11-09
+==================
+
+ * Add `application/cea`
+ * Add `application/dit`
+ * Add `application/vnd.gov.sk.e-form+zip`
+ * Add `application/vnd.tmd.mediaflex.api+xml`
+ * Type `application/epub+zip` is now IANA-registered
+
+1.1.2 / 2014-10-23
+==================
+
+ * Rebuild database for `application/x-www-form-urlencoded` change
+
+1.1.1 / 2014-10-20
+==================
+
+ * Mark `application/x-www-form-urlencoded` as compressible.
+
+1.1.0 / 2014-09-28
+==================
+
+ * Add `application/font-woff2`
+
+1.0.3 / 2014-09-25
+==================
+
+ * Fix engine requirement in package
+
+1.0.2 / 2014-09-25
+==================
+
+ * Add `application/coap-group+json`
+ * Add `application/dcd`
+ * Add `application/vnd.apache.thrift.binary`
+ * Add `image/vnd.tencent.tap`
+ * Mark all JSON-derived types as compressible
+ * Update `text/vtt` data
+
+1.0.1 / 2014-08-30
+==================
+
+ * Fix extension ordering
+
+1.0.0 / 2014-08-30
+==================
+
+ * Add `application/atf`
+ * Add `application/merge-patch+json`
+ * Add `multipart/x-mixed-replace`
+ * Add `source: 'apache'` metadata
+ * Add `source: 'iana'` metadata
+ * Remove badly-assumed charset data
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/LICENSE b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/LICENSE
index a7ae8ee9b8..a7ae8ee9b8 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/LICENSE
+++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/LICENSE
diff --git a/deps/npm/node_modules/request/node_modules/form-data/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 3b6364ebb8..25c2a3a3b7 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/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
@@ -7,24 +7,17 @@
[![Coverage Status][coveralls-image]][coveralls-url]
This is a database of all mime types.
-It consistents of a single, public JSON file and does not include any logic,
-allowing it to remain as unopinionated as possible with an API.
+It consists of a single, public JSON file and does not include any logic,
+allowing it to remain as un-opinionated as possible with an API.
It aggregates data from the following sources:
- http://www.iana.org/assignments/media-types/media-types.xhtml
- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
-## Usage
+## Installation
```bash
-npm i mime-db
-```
-
-```js
-var db = require('mime-db');
-
-// grab data on .js files
-var data = db['application/javascript'];
+npm install mime-db
```
If you're crazy enough to use this in the browser,
@@ -34,6 +27,15 @@ you can just grab the JSON file:
https://cdn.rawgit.com/jshttp/mime-db/master/db.json
```
+## Usage
+
+```js
+var db = require('mime-db');
+
+// grab data on .js files
+var data = db['application/javascript'];
+```
+
## Data Structure
The JSON file is a map lookup for lowercased mime types.
@@ -61,6 +63,13 @@ If unknown, every property could be `undefined`.
To edit the database, only make PRs against files in the `lib/` folder.
To update the build, run `npm run update`.
+## Adding Custom Media Types
+
+The best way to get new media types included in this library is to register
+them with the IANA. The community registration procedure is outlined in
+[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
+registered with the IANA are automatically pulled into this library.
+
[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg?style=flat
[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg?style=flat
[npm-url]: https://npmjs.org/package/mime-db
diff --git a/deps/npm/node_modules/request/node_modules/form-data/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 f9f7a6b3cc..35682db874 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/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
@@ -293,9 +293,6 @@
"application/eshop": {
"source": "iana"
},
- "application/example": {
- "source": "iana"
- },
"application/exi": {
"source": "iana",
"extensions": ["exi"]
@@ -431,6 +428,13 @@
"compressible": true,
"extensions": ["js"]
},
+ "application/jose": {
+ "source": "iana"
+ },
+ "application/jose+json": {
+ "source": "iana",
+ "compressible": true
+ },
"application/jrd+json": {
"source": "iana",
"compressible": true
@@ -445,11 +449,28 @@
"source": "iana",
"compressible": true
},
+ "application/json-seq": {
+ "source": "iana"
+ },
+ "application/json5": {
+ "extensions": ["json5"]
+ },
"application/jsonml+json": {
"source": "apache",
"compressible": true,
"extensions": ["jsonml"]
},
+ "application/jwk+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwk-set+json": {
+ "source": "iana",
+ "compressible": true
+ },
+ "application/jwt": {
+ "source": "iana"
+ },
"application/kpml-request+xml": {
"source": "iana"
},
@@ -547,12 +568,9 @@
"source": "iana"
},
"application/mbox": {
- "source": "apache",
+ "source": "iana",
"extensions": ["mbox"]
},
- "application/mbox+xml": {
- "source": "iana"
- },
"application/media-policy-dataset+xml": {
"source": "iana"
},
@@ -661,7 +679,7 @@
"source": "iana"
},
"application/ocsp-response": {
- "source": "apache"
+ "source": "iana"
},
"application/octet-stream": {
"source": "iana",
@@ -692,9 +710,6 @@
"source": "apache",
"extensions": ["onetoc","onetoc2","onetmp","onepkg"]
},
- "application/oscp-response": {
- "source": "iana"
- },
"application/oxps": {
"source": "iana",
"extensions": ["oxps"]
@@ -822,6 +837,10 @@
"application/raptorfec": {
"source": "iana"
},
+ "application/rdap+json": {
+ "source": "iana",
+ "compressible": true
+ },
"application/rdf+xml": {
"source": "iana",
"compressible": true,
@@ -1115,30 +1134,6 @@
"application/vividence.scriptfile": {
"source": "apache"
},
- "application/vnd-acucobol": {
- "source": "iana"
- },
- "application/vnd-curl": {
- "source": "iana"
- },
- "application/vnd-dart": {
- "source": "iana"
- },
- "application/vnd-dxr": {
- "source": "iana"
- },
- "application/vnd-fdf": {
- "source": "iana"
- },
- "application/vnd-mif": {
- "source": "iana"
- },
- "application/vnd-sema": {
- "source": "iana"
- },
- "application/vnd-wap-wmlc": {
- "source": "iana"
- },
"application/vnd.3gpp.bsf+xml": {
"source": "iana"
},
@@ -1180,7 +1175,7 @@
"extensions": ["imp"]
},
"application/vnd.acucobol": {
- "source": "apache",
+ "source": "iana",
"extensions": ["acu"]
},
"application/vnd.acucorp": {
@@ -1191,7 +1186,7 @@
"source": "apache",
"extensions": ["air"]
},
- "application/vnd.adobe.flash-movie": {
+ "application/vnd.adobe.flash.movie": {
"source": "iana"
},
"application/vnd.adobe.formscentral.fcdt": {
@@ -1461,7 +1456,7 @@
"source": "iana"
},
"application/vnd.curl": {
- "source": "apache"
+ "source": "iana"
},
"application/vnd.curl.car": {
"source": "apache",
@@ -1478,7 +1473,7 @@
"source": "iana"
},
"application/vnd.dart": {
- "source": "apache",
+ "source": "iana",
"compressible": true,
"extensions": ["dart"]
},
@@ -1489,9 +1484,6 @@
"application/vnd.debian.binary-package": {
"source": "iana"
},
- "application/vnd.dece-zip": {
- "source": "iana"
- },
"application/vnd.dece.data": {
"source": "iana",
"extensions": ["uvf","uvvf","uvd","uvvd"]
@@ -1505,7 +1497,7 @@
"extensions": ["uvx","uvvx"]
},
"application/vnd.dece.zip": {
- "source": "apache",
+ "source": "iana",
"extensions": ["uvz","uvvz"]
},
"application/vnd.denovo.fcselayout-link": {
@@ -1619,14 +1611,11 @@
"source": "iana"
},
"application/vnd.dvb.service": {
- "source": "apache",
+ "source": "iana",
"extensions": ["svc"]
},
- "application/vnd.dvb_service": {
- "source": "iana"
- },
"application/vnd.dxr": {
- "source": "apache"
+ "source": "iana"
},
"application/vnd.dynageo": {
"source": "iana",
@@ -1781,7 +1770,7 @@
"source": "iana"
},
"application/vnd.fdf": {
- "source": "apache",
+ "source": "iana",
"extensions": ["fdf"]
},
"application/vnd.fdsn.mseed": {
@@ -1931,6 +1920,9 @@
"compressible": false,
"extensions": ["kmz"]
},
+ "application/vnd.gov.sk.e-form+xml": {
+ "source": "iana"
+ },
"application/vnd.gov.sk.e-form+zip": {
"source": "iana"
},
@@ -2073,6 +2065,12 @@
"application/vnd.ims.imsccv1p1": {
"source": "iana"
},
+ "application/vnd.ims.imsccv1p2": {
+ "source": "iana"
+ },
+ "application/vnd.ims.imsccv1p3": {
+ "source": "iana"
+ },
"application/vnd.ims.lis.v2.result+json": {
"source": "iana",
"compressible": true
@@ -2363,15 +2361,12 @@
"source": "iana",
"extensions": ["mfm"]
},
- "application/vnd.micrografx-igx": {
- "source": "iana"
- },
"application/vnd.micrografx.flo": {
"source": "iana",
"extensions": ["flo"]
},
"application/vnd.micrografx.igx": {
- "source": "apache",
+ "source": "iana",
"extensions": ["igx"]
},
"application/vnd.miele+json": {
@@ -2379,7 +2374,7 @@
"compressible": true
},
"application/vnd.mif": {
- "source": "apache",
+ "source": "iana",
"extensions": ["mif"]
},
"application/vnd.minisoft-hp3000-save": {
@@ -3231,6 +3226,10 @@
"application/vnd.openxmlformats-package.relationships+xml": {
"source": "iana"
},
+ "application/vnd.oracle.resource+json": {
+ "source": "iana",
+ "compressible": true
+ },
"application/vnd.orange.indata": {
"source": "iana"
},
@@ -3340,7 +3339,7 @@
"extensions": ["ptid"]
},
"application/vnd.pwg-multiplexed": {
- "source": "apache"
+ "source": "iana"
},
"application/vnd.pwg-xhtml-print+xml": {
"source": "iana"
@@ -3463,24 +3462,6 @@
"application/vnd.scribus": {
"source": "iana"
},
- "application/vnd.sealed-doc": {
- "source": "iana"
- },
- "application/vnd.sealed-eml": {
- "source": "iana"
- },
- "application/vnd.sealed-mht": {
- "source": "iana"
- },
- "application/vnd.sealed-ppt": {
- "source": "iana"
- },
- "application/vnd.sealed-tiff": {
- "source": "iana"
- },
- "application/vnd.sealed-xls": {
- "source": "iana"
- },
"application/vnd.sealed.3df": {
"source": "iana"
},
@@ -3488,44 +3469,38 @@
"source": "iana"
},
"application/vnd.sealed.doc": {
- "source": "apache"
+ "source": "iana"
},
"application/vnd.sealed.eml": {
- "source": "apache"
+ "source": "iana"
},
"application/vnd.sealed.mht": {
- "source": "apache"
+ "source": "iana"
},
"application/vnd.sealed.net": {
"source": "iana"
},
"application/vnd.sealed.ppt": {
- "source": "apache"
+ "source": "iana"
},
"application/vnd.sealed.tiff": {
- "source": "apache"
- },
- "application/vnd.sealed.xls": {
- "source": "apache"
- },
- "application/vnd.sealedmedia.softseal-html": {
"source": "iana"
},
- "application/vnd.sealedmedia.softseal-pdf": {
+ "application/vnd.sealed.xls": {
"source": "iana"
},
"application/vnd.sealedmedia.softseal.html": {
- "source": "apache"
+ "source": "iana"
},
"application/vnd.sealedmedia.softseal.pdf": {
- "source": "apache"
+ "source": "iana"
},
"application/vnd.seemail": {
"source": "iana",
"extensions": ["see"]
},
"application/vnd.sema": {
- "source": "apache",
+ "source": "iana",
"extensions": ["sema"]
},
"application/vnd.semd": {
@@ -3847,24 +3822,18 @@
"source": "iana",
"extensions": ["vsf"]
},
- "application/vnd.wap-slc": {
- "source": "iana"
- },
- "application/vnd.wap-wbxml": {
- "source": "iana"
- },
"application/vnd.wap.sic": {
"source": "iana"
},
"application/vnd.wap.slc": {
- "source": "apache"
+ "source": "iana"
},
"application/vnd.wap.wbxml": {
- "source": "apache",
+ "source": "iana",
"extensions": ["wbxml"]
},
"application/vnd.wap.wmlc": {
- "source": "apache",
+ "source": "iana",
"extensions": ["wmlc"]
},
"application/vnd.wap.wmlscriptc": {
@@ -4016,9 +3985,6 @@
"application/vq-rtcpxr": {
"source": "iana"
},
- "application/vwg-multiplexed": {
- "source": "iana"
- },
"application/watcherinfo+xml": {
"source": "iana"
},
@@ -4759,23 +4725,17 @@
"audio/evrcwb1": {
"source": "iana"
},
- "audio/example": {
- "source": "iana"
- },
"audio/fwdred": {
"source": "iana"
},
"audio/g719": {
"source": "iana"
},
- "audio/g721": {
- "source": "iana"
- },
"audio/g722": {
"source": "iana"
},
"audio/g7221": {
- "source": "apache"
+ "source": "iana"
},
"audio/g723": {
"source": "iana"
@@ -5089,11 +5049,8 @@
"audio/vnd.rn-realaudio": {
"compressible": false
},
- "audio/vnd.sealedmedia.softseal-mpeg": {
- "source": "iana"
- },
"audio/vnd.sealedmedia.softseal.mpeg": {
- "source": "apache"
+ "source": "iana"
},
"audio/vnd.vmx.cvsd": {
"source": "iana"
@@ -5206,9 +5163,6 @@
"source": "iana",
"extensions": ["cgm"]
},
- "image/example": {
- "source": "iana"
- },
"image/fits": {
"source": "iana"
},
@@ -5284,15 +5238,6 @@
"image/tiff-fx": {
"source": "iana"
},
- "image/vnd-djvu": {
- "source": "iana"
- },
- "image/vnd-svf": {
- "source": "iana"
- },
- "image/vnd-wap-wbmp": {
- "source": "iana"
- },
"image/vnd.adobe.photoshop": {
"source": "iana",
"compressible": true,
@@ -5309,7 +5254,7 @@
"extensions": ["uvi","uvvi","uvg","uvvg"]
},
"image/vnd.djvu": {
- "source": "apache",
+ "source": "iana",
"extensions": ["djvu","djv"]
},
"image/vnd.dvb.subtitle": {
@@ -5368,26 +5313,17 @@
"image/vnd.radiance": {
"source": "iana"
},
- "image/vnd.sealed-png": {
- "source": "iana"
- },
"image/vnd.sealed.png": {
- "source": "apache"
- },
- "image/vnd.sealedmedia.softseal-gif": {
- "source": "iana"
- },
- "image/vnd.sealedmedia.softseal-jpg": {
"source": "iana"
},
"image/vnd.sealedmedia.softseal.gif": {
- "source": "apache"
+ "source": "iana"
},
"image/vnd.sealedmedia.softseal.jpg": {
- "source": "apache"
+ "source": "iana"
},
"image/vnd.svf": {
- "source": "apache"
+ "source": "iana"
},
"image/vnd.tencent.tap": {
"source": "iana"
@@ -5396,7 +5332,7 @@
"source": "iana"
},
"image/vnd.wap.wbmp": {
- "source": "apache",
+ "source": "iana",
"extensions": ["wbmp"]
},
"image/vnd.xiff": {
@@ -5488,9 +5424,6 @@
"message/disposition-notification": {
"source": "iana"
},
- "message/example": {
- "source": "iana"
- },
"message/external-body": {
"source": "iana"
},
@@ -5547,10 +5480,6 @@
"message/vnd.wfa.wsc": {
"source": "iana"
},
- "model/example": {
- "source": "iana",
- "compressible": false
- },
"model/iges": {
"source": "iana",
"compressible": false,
@@ -5561,15 +5490,12 @@
"compressible": false,
"extensions": ["msh","mesh","silo"]
},
- "model/vnd-dwf": {
- "source": "iana"
- },
"model/vnd.collada+xml": {
"source": "iana",
"extensions": ["dae"]
},
"model/vnd.dwf": {
- "source": "apache",
+ "source": "iana",
"extensions": ["dwf"]
},
"model/vnd.flatland.3dml": {
@@ -5580,10 +5506,10 @@
"extensions": ["gdl"]
},
"model/vnd.gs-gdl": {
- "source": "iana"
+ "source": "apache"
},
"model/vnd.gs.gdl": {
- "source": "apache"
+ "source": "iana"
},
"model/vnd.gtw": {
"source": "iana",
@@ -5599,17 +5525,11 @@
"model/vnd.opengex": {
"source": "iana"
},
- "model/vnd.parasolid.transmit-binary": {
- "source": "iana"
- },
- "model/vnd.parasolid.transmit-text": {
- "source": "iana"
- },
"model/vnd.parasolid.transmit.binary": {
- "source": "apache"
+ "source": "iana"
},
"model/vnd.parasolid.transmit.text": {
- "source": "apache"
+ "source": "iana"
},
"model/vnd.valve.source.compiled-map": {
"source": "iana"
@@ -5661,9 +5581,6 @@
"source": "iana",
"compressible": false
},
- "multipart/example": {
- "source": "iana"
- },
"multipart/form-data": {
"source": "iana",
"compressible": false
@@ -5744,15 +5661,15 @@
"text/enriched": {
"source": "iana"
},
- "text/example": {
- "source": "iana"
- },
"text/fwdred": {
"source": "iana"
},
"text/grammar-ref-list": {
"source": "iana"
},
+ "text/hjson": {
+ "extensions": ["hjson"]
+ },
"text/html": {
"source": "iana",
"compressible": true,
@@ -5869,17 +5786,14 @@
"compressible": true,
"extensions": ["vcard"]
},
- "text/vnd-a": {
- "source": "iana"
- },
- "text/vnd-curl": {
+ "text/vnd.a": {
"source": "iana"
},
"text/vnd.abc": {
"source": "iana"
},
"text/vnd.curl": {
- "source": "apache",
+ "source": "iana",
"extensions": ["curl"]
},
"text/vnd.curl.dcurl": {
@@ -5958,9 +5872,6 @@
"text/vnd.trolltech.linguist": {
"source": "iana"
},
- "text/vnd.wap-wml": {
- "source": "iana"
- },
"text/vnd.wap.si": {
"source": "iana"
},
@@ -5968,7 +5879,7 @@
"source": "iana"
},
"text/vnd.wap.wml": {
- "source": "apache",
+ "source": "iana",
"extensions": ["wml"]
},
"text/vnd.wap.wmlscript": {
@@ -6089,9 +6000,6 @@
"video/dv": {
"source": "apache"
},
- "video/example": {
- "source": "apache"
- },
"video/h261": {
"source": "apache",
"extensions": ["h261"]
diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db/index.js b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/index.js
index 551031f690..551031f690 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime-types/node_modules/mime-db/index.js
+++ b/deps/npm/node_modules/request/node_modules/mime-types/node_modules/mime-db/index.js
diff --git a/deps/npm/node_modules/request/node_modules/form-data/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 ff01bd5303..9b73a7cea4 100644
--- a/deps/npm/node_modules/request/node_modules/form-data/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,34 +1,57 @@
{
"name": "mime-db",
"description": "Media Type Database",
- "version": "1.3.0",
+ "version": "1.6.1",
"author": {
"name": "Jonathan Ong",
"email": "me@jongleberry.com",
"url": "http://jongleberry.com"
},
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ }
+ ],
"license": "MIT",
+ "keywords": [
+ "mime",
+ "db",
+ "type",
+ "types",
+ "database",
+ "charset",
+ "charsets"
+ ],
"repository": {
"type": "git",
"url": "https://github.com/jshttp/mime-db"
},
"devDependencies": {
- "co": "3",
+ "co": "4",
"cogent": "1",
"csv-parse": "0",
"gnode": "0.1.0",
- "istanbul": "0.3.4",
+ "istanbul": "0.3.5",
"mocha": "~1.21.4",
+ "raw-body": "~1.3.2",
"stream-to-array": "2"
},
- "engines": {
- "node": ">= 0.6"
- },
"files": [
+ "HISTORY.md",
"LICENSE",
+ "README.md",
"db.json",
"index.js"
],
+ "engines": {
+ "node": ">= 0.6"
+ },
"scripts": {
"update": "gnode scripts/extensions && gnode scripts/types && node scripts/build",
"clean": "rm src/*",
@@ -36,24 +59,15 @@
"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/"
},
- "keywords": [
- "mime",
- "db",
- "type",
- "types",
- "database",
- "charset",
- "charsets"
- ],
- "gitHead": "dc3a4d4948e9e6814404712d0f3560f1fffe7d73",
+ "gitHead": "7f07ff87267625b73dcf73b97b2530a37a85d079",
"bugs": {
"url": "https://github.com/jshttp/mime-db/issues"
},
"homepage": "https://github.com/jshttp/mime-db",
- "_id": "mime-db@1.3.0",
- "_shasum": "5fefeb25dd9b097c5d45091c60f8149b98d749ec",
- "_from": "mime-db@>=1.3.0 <1.4.0",
- "_npmVersion": "1.4.21",
+ "_id": "mime-db@1.6.1",
+ "_shasum": "6e85cd87c961d130d6ebd37efdfc2c0e06fdfcd3",
+ "_from": "mime-db@>=1.6.0 <1.7.0",
+ "_npmVersion": "1.4.28",
"_npmUser": {
"name": "dougwilson",
"email": "doug@somethingdoug.com"
@@ -69,10 +83,10 @@
}
],
"dist": {
- "shasum": "5fefeb25dd9b097c5d45091c60f8149b98d749ec",
- "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.3.0.tgz"
+ "shasum": "6e85cd87c961d130d6ebd37efdfc2c0e06fdfcd3",
+ "tarball": "http://registry.npmjs.org/mime-db/-/mime-db-1.6.1.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.3.0.tgz",
+ "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.6.1.tgz",
"readme": "ERROR: No README data found!"
}
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 67432028b8..060586bd77 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,46 +1,61 @@
{
"name": "mime-types",
"description": "The ultimate javascript content-type utility.",
- "version": "1.0.2",
- "author": {
- "name": "Jonathan Ong",
- "email": "me@jongleberry.com",
- "url": "http://jongleberry.com"
- },
+ "version": "2.0.8",
"contributors": [
{
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
"name": "Jeremiah Senkpiel",
"email": "fishrock123@rocketmail.com",
"url": "https://searchbeam.jit.su"
+ },
+ {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
}
],
+ "license": "MIT",
+ "keywords": [
+ "mime",
+ "types"
+ ],
"repository": {
"type": "git",
- "url": "https://github.com/expressjs/mime-types"
+ "url": "https://github.com/jshttp/mime-types"
+ },
+ "dependencies": {
+ "mime-db": "~1.6.0"
},
- "license": "MIT",
- "main": "lib",
"devDependencies": {
- "co": "3",
- "cogent": "0",
- "mocha": "1",
- "should": "3"
+ "istanbul": "0.3.5",
+ "mocha": "~1.21.5"
},
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
"engines": {
- "node": ">= 0.8.0"
+ "node": ">= 0.6"
},
"scripts": {
- "test": "make test"
+ "test": "mocha --reporter spec test/test.js",
+ "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": "e82b23836eb42003b8346fb31769da2fb7eb54e8",
+ "gitHead": "19e01e8bd630a1719ada4a3e3e9b7192b4ddb034",
"bugs": {
- "url": "https://github.com/expressjs/mime-types/issues"
+ "url": "https://github.com/jshttp/mime-types/issues"
},
- "homepage": "https://github.com/expressjs/mime-types",
- "_id": "mime-types@1.0.2",
- "_shasum": "995ae1392ab8affcbfcb2641dd054e943c0d5dce",
- "_from": "mime-types@>=1.0.1 <1.1.0",
- "_npmVersion": "1.4.21",
+ "homepage": "https://github.com/jshttp/mime-types",
+ "_id": "mime-types@2.0.8",
+ "_shasum": "5612bf6b9ec8a1285a81184fa4237fbfdbb89a7e",
+ "_from": "mime-types@>=2.0.1 <2.1.0",
+ "_npmVersion": "1.4.28",
"_npmUser": {
"name": "dougwilson",
"email": "doug@somethingdoug.com"
@@ -60,10 +75,10 @@
}
],
"dist": {
- "shasum": "995ae1392ab8affcbfcb2641dd054e943c0d5dce",
- "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz"
+ "shasum": "5612bf6b9ec8a1285a81184fa4237fbfdbb89a7e",
+ "tarball": "http://registry.npmjs.org/mime-types/-/mime-types-2.0.8.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz",
+ "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.8.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/oauth-sign/index.js b/deps/npm/node_modules/request/node_modules/oauth-sign/index.js
index bdfd14e186..63b418c4c4 100644
--- a/deps/npm/node_modules/request/node_modules/oauth-sign/index.js
+++ b/deps/npm/node_modules/request/node_modules/oauth-sign/index.js
@@ -93,8 +93,18 @@ function rsasign (httpMethod, base_uri, params, private_key, token_secret) {
return rsa(key, base)
}
+function plaintext (consumer_secret, token_secret) {
+ var key = [
+ consumer_secret || '',
+ token_secret || ''
+ ].map(rfc3986).join('&')
+
+ return key
+}
+
function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) {
var method
+ var skipArgs = 1
switch (signMethod) {
case 'RSA-SHA1':
@@ -103,14 +113,19 @@ function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_
case 'HMAC-SHA1':
method = hmacsign
break
+ case 'PLAINTEXT':
+ method = plaintext
+ skipArgs = 4
+ break
default:
throw new Error("Signature method not supported: " + signMethod)
}
- return method.apply(null, [].slice.call(arguments, 1))
+ return method.apply(null, [].slice.call(arguments, skipArgs))
}
exports.hmacsign = hmacsign
exports.rsasign = rsasign
+exports.plaintext = plaintext
exports.sign = sign
exports.rfc3986 = rfc3986
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 d49bfb746c..019eff0cd5 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
@@ -6,7 +6,7 @@
},
"name": "oauth-sign",
"description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.",
- "version": "0.5.0",
+ "version": "0.6.0",
"repository": {
"url": "https://github.com/mikeal/oauth-sign"
},
@@ -20,30 +20,34 @@
"scripts": {
"test": "node test.js"
},
- "gitHead": "6fea86c2d4a38e1b3780ad0cc56f00196e5213c1",
+ "gitHead": "f1b5d7714712ab7eec485cca9d18ae95db58aa6b",
"bugs": {
"url": "https://github.com/mikeal/oauth-sign/issues"
},
"homepage": "https://github.com/mikeal/oauth-sign",
- "_id": "oauth-sign@0.5.0",
- "_shasum": "d767f5169325620eab2e087ef0c472e773db6461",
- "_from": "oauth-sign@>=0.5.0 <0.6.0",
- "_npmVersion": "2.0.0",
+ "_id": "oauth-sign@0.6.0",
+ "_shasum": "7dbeae44f6ca454e1f168451d630746735813ce3",
+ "_from": "oauth-sign@>=0.6.0 <0.7.0",
+ "_npmVersion": "1.4.14",
"_npmUser": {
- "name": "mikeal",
- "email": "mikeal.rogers@gmail.com"
+ "name": "nylen",
+ "email": "jnylen@gmail.com"
},
"maintainers": [
{
"name": "mikeal",
"email": "mikeal.rogers@gmail.com"
+ },
+ {
+ "name": "nylen",
+ "email": "jnylen@gmail.com"
}
],
"dist": {
- "shasum": "d767f5169325620eab2e087ef0c472e773db6461",
- "tarball": "http://registry.npmjs.org/oauth-sign/-/oauth-sign-0.5.0.tgz"
+ "shasum": "7dbeae44f6ca454e1f168451d630746735813ce3",
+ "tarball": "http://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.5.0.tgz",
+ "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/node_modules/oauth-sign/test.js b/deps/npm/node_modules/request/node_modules/oauth-sign/test.js
index b7a4c8022d..aea800b6f0 100644
--- a/deps/npm/node_modules/request/node_modules/oauth-sign/test.js
+++ b/deps/npm/node_modules/request/node_modules/oauth-sign/test.js
@@ -1,4 +1,5 @@
-var hmacsign = require('./index').hmacsign
+var oauth = require('./index')
+ , hmacsign = oauth.hmacsign
, assert = require('assert')
, qs = require('querystring')
;
@@ -61,3 +62,13 @@ console.log(rfc5849sign)
console.log('r6/TJjbCOr97/+UU0NsvSne7s5g=')
assert.equal(rfc5849sign, 'r6/TJjbCOr97/+UU0NsvSne7s5g=')
+
+// PLAINTEXT
+
+var plainSign = oauth.sign('PLAINTEXT', 'GET', 'http://dummy.com', {}, 'consumer_secret', 'token_secret')
+console.log(plainSign)
+assert.equal(plainSign, 'consumer_secret&token_secret')
+
+plainSign = oauth.plaintext('consumer_secret', 'token_secret')
+console.log(plainSign)
+assert.equal(plainSign, 'consumer_secret&token_secret')
diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json
index 51cd6947b9..0f021a5d13 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.51.0",
+ "version": "2.53.0",
"author": {
"name": "Mikeal Rogers",
"email": "mikeal.rogers@gmail.com"
@@ -26,46 +26,51 @@
"main": "index.js",
"dependencies": {
"bl": "~0.9.0",
- "caseless": "~0.8.0",
+ "caseless": "~0.9.0",
"forever-agent": "~0.5.0",
"form-data": "~0.2.0",
"json-stringify-safe": "~5.0.0",
- "mime-types": "~1.0.1",
+ "mime-types": "~2.0.1",
"node-uuid": "~1.4.0",
"qs": "~2.3.1",
"tunnel-agent": "~0.4.0",
"tough-cookie": ">=0.12.0",
"http-signature": "~0.10.0",
- "oauth-sign": "~0.5.0",
- "hawk": "1.1.1",
+ "oauth-sign": "~0.6.0",
+ "hawk": "~2.3.0",
"aws-sign2": "~0.5.0",
"stringstream": "~0.0.4",
- "combined-stream": "~0.0.5"
+ "combined-stream": "~0.0.5",
+ "isstream": "~0.1.1"
},
"scripts": {
- "test": "npm run lint && node node_modules/.bin/taper tests/test-*.js && npm run test-browser",
- "test-browser": "browserify tests/browser/test.js -o tests/browser/test-browser.js && karma start tests/browser/karma.conf.js",
+ "test": "npm run lint && node node_modules/.bin/taper tests/test-*.js && npm run test-browser && npm run clean",
+ "test-browser": "node tests/browser/start.js",
"lint": "node node_modules/.bin/eslint lib/ *.js tests/ && echo Lint passed."
},
"devDependencies": {
"browserify": "~5.9.1",
+ "browserify-istanbul": "~0.1.3",
"coveralls": "~2.11.2",
"eslint": "0.5.1",
"function-bind": "~1.0.0",
"istanbul": "~0.3.2",
"karma": "~0.12.21",
+ "karma-browserify": "~3.0.1",
"karma-cli": "0.0.4",
+ "karma-coverage": "0.2.6",
"karma-phantomjs-launcher": "~0.1.4",
"karma-tap": "~1.0.1",
"rimraf": "~2.2.8",
+ "server-destroy": "~1.0.0",
"tape": "~3.0.0",
- "taper": "~0.3.0"
+ "taper": "~0.4.0"
},
- "gitHead": "1c8aca6a9205df58660c676005fb8ec4603d5265",
+ "gitHead": "541ce25648bc2ecab924d7d7197a2685fa16d348",
"homepage": "https://github.com/request/request",
- "_id": "request@2.51.0",
- "_shasum": "35d00bbecc012e55f907b1bd9e0dbd577bfef26e",
- "_from": "request@>=2.51.0 <2.52.0",
+ "_id": "request@2.53.0",
+ "_shasum": "180a3ae92b7b639802e4f9545dd8fcdeb71d760c",
+ "_from": "request@>=2.53.0 <2.54.0",
"_npmVersion": "1.4.14",
"_npmUser": {
"name": "nylen",
@@ -86,10 +91,10 @@
}
],
"dist": {
- "shasum": "35d00bbecc012e55f907b1bd9e0dbd577bfef26e",
- "tarball": "http://registry.npmjs.org/request/-/request-2.51.0.tgz"
+ "shasum": "180a3ae92b7b639802e4f9545dd8fcdeb71d760c",
+ "tarball": "http://registry.npmjs.org/request/-/request-2.53.0.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/request/-/request-2.51.0.tgz",
+ "_resolved": "https://registry.npmjs.org/request/-/request-2.53.0.tgz",
"readme": "ERROR: No README data found!"
}
diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js
index 90220d2ba4..f43c8c6b5b 100644
--- a/deps/npm/node_modules/request/request.js
+++ b/deps/npm/node_modules/request/request.js
@@ -10,7 +10,6 @@ var http = require('http')
, zlib = require('zlib')
, helpers = require('./lib/helpers')
, bl = require('bl')
- , oauth = require('oauth-sign')
, hawk = require('hawk')
, aws = require('aws-sign2')
, httpSignature = require('http-signature')
@@ -23,9 +22,12 @@ var http = require('http')
, FormData = require('form-data')
, cookies = require('./lib/cookies')
, copy = require('./lib/copy')
- , debug = require('./lib/debug')
, net = require('net')
, CombinedStream = require('combined-stream')
+ , isstream = require('isstream')
+ , getProxyFromURI = require('./lib/getProxyFromURI')
+ , Auth = require('./lib/auth').Auth
+ , oauth = require('./lib/oauth')
var safeStringify = helpers.safeStringify
, md5 = helpers.md5
@@ -131,21 +133,52 @@ function constructProxyHeaderWhiteList(headers, proxyHeaderWhiteList) {
}, {})
}
-function construcTunnelOptions(request) {
+function getTunnelOption(self, options) {
+ // Tunnel HTTPS by default, or if a previous request in the redirect chain
+ // was tunneled. Allow the user to override this setting.
+
+ // If self.tunnel is already set (because this is a redirect), use the
+ // existing value.
+ if (typeof self.tunnel !== 'undefined') {
+ return self.tunnel
+ }
+
+ // If options.tunnel is set (the user specified a value), use it.
+ if (typeof options.tunnel !== 'undefined') {
+ return options.tunnel
+ }
+
+ // If the destination is HTTPS, tunnel.
+ if (self.uri.protocol === 'https:') {
+ return true
+ }
+
+ // Otherwise, leave tunnel unset, because if a later request in the redirect
+ // chain is HTTPS then that request (and any subsequent ones) should be
+ // tunneled.
+ return undefined
+}
+
+function constructTunnelOptions(request) {
var proxy = request.proxy
var tunnelOptions = {
- proxy: {
- host: proxy.hostname,
- port: +proxy.port,
- proxyAuth: proxy.auth,
- headers: request.proxyHeaders
+ proxy : {
+ host : proxy.hostname,
+ port : +proxy.port,
+ proxyAuth : proxy.auth,
+ headers : request.proxyHeaders
},
- rejectUnauthorized: request.rejectUnauthorized,
- headers: request.headers,
- ca: request.ca,
- cert: request.cert,
- key: request.key
+ headers : request.headers,
+ ca : request.ca,
+ cert : request.cert,
+ key : request.key,
+ passphrase : request.passphrase,
+ pfx : request.pfx,
+ ciphers : request.ciphers,
+ rejectUnauthorized : request.rejectUnauthorized,
+ secureOptions : request.secureOptions,
+ secureProtocol : request.secureProtocol
}
return tunnelOptions
@@ -164,60 +197,6 @@ function getTunnelFn(request) {
return tunnel[tunnelFnName]
}
-// Decide the proper request proxy to use based on the request URI object and the
-// environmental variables (NO_PROXY, HTTP_PROXY, etc.)
-function getProxyFromURI(uri) {
- // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html)
- var noProxy = process.env.NO_PROXY || process.env.no_proxy || null
-
- // easy case first - if NO_PROXY is '*'
- if (noProxy === '*') {
- return null
- }
-
- // otherwise, parse the noProxy value to see if it applies to the URL
- if (noProxy !== null) {
- var noProxyItem, hostname, port, noProxyItemParts, noProxyHost, noProxyPort, noProxyList
-
- // canonicalize the hostname, so that 'oogle.com' won't match 'google.com'
- hostname = uri.hostname.replace(/^\.*/, '.').toLowerCase()
- noProxyList = noProxy.split(',')
-
- for (var i = 0, len = noProxyList.length; i < len; i++) {
- noProxyItem = noProxyList[i].trim().toLowerCase()
-
- // no_proxy can be granular at the port level, which complicates things a bit.
- if (noProxyItem.indexOf(':') > -1) {
- noProxyItemParts = noProxyItem.split(':', 2)
- noProxyHost = noProxyItemParts[0].replace(/^\.*/, '.')
- noProxyPort = noProxyItemParts[1]
- port = uri.port || (uri.protocol === 'https:' ? '443' : '80')
-
- // we've found a match - ports are same and host ends with no_proxy entry.
- if (port === noProxyPort && hostname.indexOf(noProxyHost) === hostname.length - noProxyHost.length) {
- return null
- }
- } else {
- noProxyItem = noProxyItem.replace(/^\.*/, '.')
- var isMatchedAt = hostname.indexOf(noProxyItem)
- if (isMatchedAt > -1 && isMatchedAt === hostname.length - noProxyItem.length) {
- return null
- }
- }
- }
- }
-
- // check for HTTP(S)_PROXY environment variables
- if (uri.protocol === 'http:') {
- return process.env.HTTP_PROXY || process.env.http_proxy || null
- } else if (uri.protocol === 'https:') {
- return process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy || null
- }
-
- // return null if all else fails (What uri protocol are you using then?)
- return null
-}
-
// Function for properly handling a connection error
function connectionErrorHandler(error) {
var socket = this
@@ -253,8 +232,14 @@ function responseToJSON() {
}
}
+// encode rfc3986 characters
+function rfc3986 (str) {
+ return str.replace(/[!'()*]/g, function(c) {
+ return '%' + c.charCodeAt(0).toString(16).toUpperCase()
+ })
+}
+
function Request (options) {
- // if tunnel property of options was not given default to false
// if given the method property in options, set property explicitMethod to true
// extend the Request instance with any non-reserved properties
@@ -273,64 +258,50 @@ function Request (options) {
self.readable = true
self.writable = true
- if (typeof options.tunnel === 'undefined') {
- options.tunnel = false
- }
if (options.method) {
self.explicitMethod = true
}
- self.canTunnel = options.tunnel !== false && tunnel
self.init(options)
}
util.inherits(Request, stream.Stream)
-Request.prototype.setupTunnel = function () {
- // Set up the tunneling agent if necessary
- // Only send the proxy whitelisted header names.
- // Turn on tunneling for the rest of request.
+// Debugging
+Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG)
+function debug() {
+ if (Request.debug) {
+ console.error('REQUEST %s', util.format.apply(util, arguments))
+ }
+}
+Request.prototype.setupTunnel = function () {
var self = this
if (typeof self.proxy === 'string') {
self.proxy = url.parse(self.proxy)
}
-
- if (!self.proxy) {
+
+ if (!self.proxy || !self.tunnel) {
return false
}
- if (!self.tunnel && self.uri.protocol !== 'https:') {
- return false
- }
-
- // Always include `defaultProxyHeaderExclusiveList`
-
- if (!self.proxyHeaderExclusiveList) {
- self.proxyHeaderExclusiveList = []
- }
-
+ // Setup Proxy Header Exclusive List and White List
+ self.proxyHeaderExclusiveList = self.proxyHeaderExclusiveList || []
+ self.proxyHeaderWhiteList = self.proxyHeaderWhiteList || defaultProxyHeaderWhiteList
var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList)
-
- // Treat `proxyHeaderExclusiveList` as part of `proxyHeaderWhiteList`
-
- if (!self.proxyHeaderWhiteList) {
- self.proxyHeaderWhiteList = defaultProxyHeaderWhiteList
- }
-
var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList)
- var proxyHost = constructProxyHost(self.uri)
+ // Setup Proxy Headers and Proxy Headers Host
+ // Only send the Proxy White Listed Header names
self.proxyHeaders = constructProxyHeaderWhiteList(self.headers, proxyHeaderWhiteList)
- self.proxyHeaders.host = proxyHost
-
+ self.proxyHeaders.host = constructProxyHost(self.uri)
proxyHeaderExclusiveList.forEach(self.removeHeader, self)
-
+
+ // Set Agent from Tunnel Data
var tunnelFn = getTunnelFn(self)
- var tunnelOptions = construcTunnelOptions(self)
-
+ var tunnelOptions = constructTunnelOptions(self)
self.agent = tunnelFn(tunnelOptions)
- self.tunnel = true
+
return true
}
@@ -420,8 +391,7 @@ Request.prototype.init = function (options) {
self.proxy = getProxyFromURI(self.uri)
}
- // Pass in `tunnel:true` to *always* tunnel through proxies
- self.tunnel = !!options.tunnel
+ self.tunnel = getTunnelOption(self, options)
if (self.proxy) {
self.setupTunnel()
}
@@ -525,6 +495,8 @@ 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)
}
@@ -810,6 +782,14 @@ Request.prototype.getNewAgent = function () {
options.cert = self.cert
}
+ if (self.pfx) {
+ options.pfx = self.pfx
+ }
+
+ if (self.passphrase) {
+ options.passphrase = self.passphrase
+ }
+
var poolKey = ''
// different types of agents are in different pools
@@ -840,9 +820,19 @@ Request.prototype.getNewAgent = function () {
}
if (options.cert) {
+ if (poolKey) {
+ poolKey += ':'
+ }
poolKey += options.cert.toString('ascii') + options.key.toString('ascii')
}
+ if (options.pfx) {
+ if (poolKey) {
+ poolKey += ':'
+ }
+ poolKey += options.pfx.toString('ascii')
+ }
+
if (options.ciphers) {
if (poolKey) {
poolKey += ':'
@@ -1066,80 +1056,11 @@ Request.prototype.onRequestResponse = function (response) {
break
}
}
- } else if (response.statusCode === 401 && self._hasAuth && !self._sentAuth) {
- var authHeader = response.caseless.get('www-authenticate')
- var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase()
- debug('reauth', authVerb)
-
- switch (authVerb) {
- case 'basic':
- self.auth(self._user, self._pass, true)
- redirectTo = self.uri
- break
-
- case 'bearer':
- self.auth(null, null, true, self._bearer)
- redirectTo = self.uri
- break
-
- case 'digest':
- // TODO: More complete implementation of RFC 2617.
- // - check challenge.algorithm
- // - support algorithm="MD5-sess"
- // - handle challenge.domain
- // - support qop="auth-int" only
- // - handle Authentication-Info (not necessarily?)
- // - check challenge.stale (not necessarily?)
- // - increase nc (not necessarily?)
- // For reference:
- // http://tools.ietf.org/html/rfc2617#section-3
- // https://github.com/bagder/curl/blob/master/lib/http_digest.c
-
- var challenge = {}
- var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi
- for (;;) {
- var match = re.exec(authHeader)
- if (!match) {
- break
- }
- challenge[match[1]] = match[2] || match[3]
- }
-
- var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass)
- var ha2 = md5(self.method + ':' + self.uri.path)
- var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth'
- var nc = qop && '00000001'
- var cnonce = qop && uuid().replace(/-/g, '')
- var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2)
- var authValues = {
- username: self._user,
- realm: challenge.realm,
- nonce: challenge.nonce,
- uri: self.uri.path,
- qop: qop,
- response: digestResponse,
- nc: nc,
- cnonce: cnonce,
- algorithm: challenge.algorithm,
- opaque: challenge.opaque
- }
-
- authHeader = []
- for (var k in authValues) {
- if (authValues[k]) {
- if (k === 'qop' || k === 'nc' || k === 'algorithm') {
- authHeader.push(k + '=' + authValues[k])
- } else {
- authHeader.push(k + '="' + authValues[k] + '"')
- }
- }
- }
- authHeader = 'Digest ' + authHeader.join(', ')
- self.setHeader('authorization', authHeader)
- self._sentAuth = true
-
- redirectTo = self.uri
- 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
}
}
@@ -1313,7 +1234,7 @@ Request.prototype.onRequestResponse = function (response) {
}
debug('emitting complete', self.uri.href)
if(typeof response.body === 'undefined' && !self._json) {
- response.body = ''
+ response.body = self.encoding === null ? new Buffer(0) : ''
}
self.emit('complete', response, response.body)
})
@@ -1402,7 +1323,9 @@ Request.prototype.qs = function (q, clobber) {
return self
}
- self.uri = url.parse(self.uri.href.split('?')[0] + '?' + self.qsLib.stringify(base))
+ var qs = self.qsLib.stringify(base)
+
+ self.uri = url.parse(self.uri.href.split('?')[0] + '?' + rfc3986(qs))
self.url = self.uri
self.path = self.uri.path
@@ -1413,24 +1336,46 @@ Request.prototype.form = function (form) {
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 = rfc3986(self.body)
return self
}
// create form-data object
self._form = new FormData()
+ self._form.on('error',function(err) {
+ err.message = 'form-data: ' + err.message
+ self.emit('error', err)
+ self.abort()
+ })
return self._form
}
Request.prototype.multipart = function (multipart) {
var self = this
- var chunked = (multipart instanceof Array) || (multipart.chunked === undefined) || multipart.chunked
- multipart = multipart.data || multipart
+ var chunked = false
+ var _multipart = multipart.data || multipart
- var items = chunked ? new CombinedStream() : []
- function add (part) {
- return chunked ? items.append(part) : items.push(new Buffer(part))
+ if (!_multipart.forEach) {
+ throw new Error('Argument error, options.multipart.')
}
- if (chunked) {
+ 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')
}
@@ -1441,19 +1386,17 @@ Request.prototype.multipart = function (multipart) {
self.setHeader(headerName, self.headers[headerName].split(';')[0] + '; boundary=' + self.boundary)
}
- if (!multipart.forEach) {
- throw new Error('Argument error, options.multipart.')
+ 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) {
+ _multipart.forEach(function (part) {
var body = part.body
- if(typeof body === 'undefined') {
- throw new Error('Body attribute missing in multipart.')
- }
var preamble = '--' + self.boundary + '\r\n'
Object.keys(part).forEach(function (key) {
if (key === 'body') { return }
@@ -1470,7 +1413,7 @@ Request.prototype.multipart = function (multipart) {
add('\r\n')
}
- self[chunked ? '_multipart' : 'body'] = items
+ self[chunked ? '_multipart' : 'body'] = parts
return self
}
Request.prototype.json = function (val) {
@@ -1482,8 +1425,12 @@ Request.prototype.json = function (val) {
self._json = true
if (typeof val === 'boolean') {
- if (self.body !== undefined && self.getHeader('content-type') !== 'application/x-www-form-urlencoded') {
- self.body = safeStringify(self.body)
+ if (self.body !== undefined) {
+ if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) {
+ self.body = safeStringify(self.body)
+ } else {
+ self.body = rfc3986(self.body)
+ }
if (!self.hasHeader('content-type')) {
self.setHeader('content-type', 'application/json')
}
@@ -1523,29 +1470,17 @@ var getHeader = Request.prototype.getHeader
Request.prototype.auth = function (user, pass, sendImmediately, bearer) {
var self = this
+
+ var authHeader
if (bearer !== undefined) {
- self._bearer = bearer
- self._hasAuth = true
- if (sendImmediately || typeof sendImmediately === 'undefined') {
- if (typeof bearer === 'function') {
- bearer = bearer()
- }
- self.setHeader('authorization', 'Bearer ' + bearer)
- self._sentAuth = true
- }
- return self
- }
- if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) {
- throw new Error('auth() received invalid user or password')
+ authHeader = self._auth.bearer(bearer, sendImmediately)
+ } else {
+ authHeader = self._auth.basic(user, pass, sendImmediately)
}
- self._user = user
- self._pass = pass
- self._hasAuth = true
- var header = typeof pass !== 'undefined' ? user + ':' + pass : user
- if (sendImmediately || typeof sendImmediately === 'undefined') {
- self.setHeader('authorization', 'Basic ' + toBase64(header))
- self._sentAuth = true
+ if (authHeader) {
+ self.setHeader('authorization', authHeader)
}
+
return self
}
@@ -1606,61 +1541,29 @@ Request.prototype.hawk = function (opts) {
Request.prototype.oauth = function (_oauth) {
var self = this
- var form, query
- if (self.hasHeader('content-type') &&
- self.getHeader('content-type').slice(0, 'application/x-www-form-urlencoded'.length) ===
- 'application/x-www-form-urlencoded'
- ) {
- form = self.body
- }
- if (self.uri.query) {
- query = self.uri.query
- }
- var oa = {}
- for (var i in _oauth) {
- oa['oauth_' + i] = _oauth[i]
- }
- if ('oauth_realm' in oa) {
- delete oa.oauth_realm
- }
- if (!oa.oauth_version) {
- oa.oauth_version = '1.0'
- }
- if (!oa.oauth_timestamp) {
- oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString()
+ 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)
}
- if (!oa.oauth_nonce) {
- oa.oauth_nonce = uuid().replace(/-/g, '')
+ else if (result.transport === 'query') {
+ self.path += result.oauth
}
- if (!oa.oauth_signature_method) {
- oa.oauth_signature_method = 'HMAC-SHA1'
+ else if (result.transport === 'body') {
+ self.body = result.oauth
}
- var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key
- delete oa.oauth_consumer_secret
- delete oa.oauth_private_key
- var token_secret = oa.oauth_token_secret
- delete oa.oauth_token_secret
-
- var baseurl = self.uri.protocol + '//' + self.uri.host + self.uri.pathname
- var params = self.qsLib.parse([].concat(query, form, self.qsLib.stringify(oa)).join('&'))
-
- var signature = oauth.sign(
- oa.oauth_signature_method,
- self.method,
- baseurl,
- params,
- consumer_secret_or_private_key,
- token_secret)
-
- var realm = _oauth.realm ? 'realm="' + _oauth.realm + '",' : ''
- var authHeader = 'OAuth ' + realm +
- Object.keys(oa).sort().map(function (i) {return i + '="' + oauth.rfc3986(oa[i]) + '"'}).join(',')
- authHeader += ',oauth_signature="' + oauth.rfc3986(signature) + '"'
- self.setHeader('Authorization', authHeader)
return self
}
+
Request.prototype.jar = function (jar) {
var self = this
var cookies
diff --git a/deps/npm/package.json b/deps/npm/package.json
index 9717becdce..07b74e0960 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,7 +1,7 @@
{
- "version": "2.3.0",
+ "version": "2.5.1",
"name": "npm",
- "description": "A package manager for node",
+ "description": "a package manager for JavaScript",
"keywords": [
"package manager",
"modules",
@@ -43,13 +43,13 @@
"chmodr": "~0.1.0",
"chownr": "0",
"cmd-shim": "~2.0.1",
- "columnify": "~1.3.2",
+ "columnify": "~1.4.1",
"config-chain": "~1.1.8",
"dezalgo": "~1.0.1",
"editor": "~0.1.0",
"fs-vacuum": "~1.2.5",
"fs-write-stream-atomic": "~1.0.2",
- "fstream": "~1.0.3",
+ "fstream": "~1.0.4",
"fstream-npm": "~1.0.1",
"github-url-from-git": "~1.4.0",
"github-url-from-username-repo": "~1.0.2",
@@ -58,7 +58,7 @@
"inflight": "~1.0.4",
"inherits": "~2.0.1",
"ini": "~1.3.2",
- "init-package-json": "~1.1.3",
+ "init-package-json": "~1.2.0",
"lockfile": "~1.0.0",
"lru-cache": "~2.5.0",
"minimatch": "~2.0.1",
@@ -70,7 +70,7 @@
"npm-cache-filename": "~1.0.1",
"npm-install-checks": "~1.0.5",
"npm-package-arg": "~2.1.3",
- "npm-registry-client": "~5.0.0",
+ "npm-registry-client": "~6.0.7",
"npm-user-validate": "~0.1.1",
"npmlog": "~0.1.1",
"once": "~1.3.1",
@@ -82,7 +82,7 @@
"read-package-json": "~1.2.7",
"readable-stream": "~1.0.33",
"realize-package-specifier": "~1.3.0",
- "request": "~2.51.0",
+ "request": "~2.53.0",
"retry": "~0.6.1",
"rimraf": "~2.2.8",
"semver": "~4.2.0",
@@ -165,11 +165,11 @@
"write-file-atomic"
],
"devDependencies": {
- "marked": "~0.3.2",
+ "marked": "~0.3.3",
"marked-man": "~0.1.4",
- "nock": "~0.57.0",
+ "nock": "~0.59.0",
"npm-registry-couchapp": "~2.6.2",
- "npm-registry-mock": "~0.6.3",
+ "npm-registry-mock": "~1.0.0",
"require-inject": "~1.1.0",
"tap": "~0.5.0"
},
diff --git a/deps/npm/scripts/update-authors.sh b/deps/npm/scripts/update-authors.sh
new file mode 100755
index 0000000000..8708e240ed
--- /dev/null
+++ b/deps/npm/scripts/update-authors.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+git log --reverse --format='%aN <%aE>' | awk '
+BEGIN {
+ print "# Authors sorted by whether or not they'\''re me";
+}
+
+{
+ if (all[$NF] != 1) {
+ all[$NF] = 1;
+ ordered[length(all)] = $0;
+ }
+}
+
+END {
+ for (i in ordered) {
+ print ordered[i];
+ }
+}
+' > AUTHORS \ No newline at end of file
diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js
index 1c51ed7189..7dcfc35cc8 100644
--- a/deps/npm/test/common-tap.js
+++ b/deps/npm/test/common-tap.js
@@ -7,6 +7,8 @@ process.env.npm_config_loglevel = "error"
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.random_env_var = "foo"
var bin = exports.bin = require.resolve("../bin/npm-cli.js")
var once = require("once")
diff --git a/deps/npm/test/disabled/outdated-depth-integer.js b/deps/npm/test/disabled/outdated-depth-integer.js
index 9e4087a4ca..4cad5e6930 100644
--- a/deps/npm/test/disabled/outdated-depth-integer.js
+++ b/deps/npm/test/disabled/outdated-depth-integer.js
@@ -24,7 +24,7 @@ test('outdated depth integer', function (t) {
process.chdir(pkg)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (s) {
npm.load({
cache: pkg + '/cache'
, loglevel: 'silent'
@@ -49,4 +49,4 @@ test('outdated depth integer', function (t) {
test("cleanup", function (t) {
cleanup()
t.end()
-}) \ No newline at end of file
+})
diff --git a/deps/npm/test/run.js b/deps/npm/test/run.js
index 6feba3596a..5b33e68ab4 100644
--- a/deps/npm/test/run.js
+++ b/deps/npm/test/run.js
@@ -121,9 +121,7 @@ function flatten (arr) {
function setup (cb) {
cleanup(function (er) {
if (er) return cb(er)
- execChain([ [ "node \""+npmcli+"\" install \""+npmpkg+"\"", root ],
- [ "npm config set package-config:foo boo", root ]
- ], cb)
+ exec("node \""+npmcli+"\" install \""+npmpkg+"\"", root, false, cb)
})
}
diff --git a/deps/npm/test/tap/404-parent.js b/deps/npm/test/tap/404-parent.js
index e40d850de7..eb8ae9bb15 100644
--- a/deps/npm/test/tap/404-parent.js
+++ b/deps/npm/test/tap/404-parent.js
@@ -40,8 +40,13 @@ function setup() {
process.chdir(pkg)
}
-function performInstall(cb) {
- mr(common.port, function (s) { // create mock registry.
+function plugin (server) {
+ server.get("/test-npm-404-parent-test")
+ .reply(404, {"error": "version not found"})
+}
+
+function performInstall (cb) {
+ mr({port : common.port, plugin : plugin}, function (er, s) { // create mock registry.
npm.load({registry: common.registry}, function () {
npm.commands.install(pkg, [], function (err) {
cb(err)
diff --git a/deps/npm/test/tap/access.js b/deps/npm/test/tap/access.js
new file mode 100644
index 0000000000..aa97b1a203
--- /dev/null
+++ b/deps/npm/test/tap/access.js
@@ -0,0 +1,91 @@
+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 pkg = path.resolve(__dirname, "access")
+var server
+
+var scoped = {
+ name : "@scoped/pkg",
+ version : "1.1.1"
+}
+
+var body = {
+ access : "public"
+}
+
+function mocks (server) {
+ server.post("/-/package/@scoped%2fpkg/access", JSON.stringify(body))
+ .reply(200, { "access" : "public" })
+ server.post("/-/package/@scoped%2fanother/access", JSON.stringify(body))
+ .reply(200, { "access" : "public" })
+}
+
+test("setup", function (t) {
+ mkdirp(pkg, function (er) {
+ t.ifError(er, pkg + " made successfully")
+
+ mr({port : common.port, plugin : mocks}, function (err, s) {
+ server = s
+
+ fs.writeFile(
+ path.join(pkg, "package.json"),
+ JSON.stringify(scoped),
+ function (er) {
+ t.ifError(er, "wrote package.json")
+ t.end()
+ }
+ )
+ })
+ })
+})
+
+test("npm access on current package", function (t) {
+ common.npm(
+ [
+ "access",
+ "public",
+ "--registry", common.registry,
+ "--loglevel", "silent"
+ ],
+ { cwd : pkg },
+ function (er, code, stdout, stderr) {
+ t.ifError(er, "npm access")
+ t.notOk(code, "exited OK")
+ t.notOk(stderr, "no error output")
+
+ t.end()
+ }
+ )
+})
+
+test("npm access on named package", function (t) {
+ common.npm(
+ [
+ "access",
+ "public", "@scoped/another",
+ "--registry", common.registry,
+ "--loglevel", "silent"
+ ],
+ { cwd : pkg },
+ function (er, code, stdout, stderr) {
+ t.ifError(er, "npm access")
+ t.notOk(code, "exited OK")
+ t.notOk(stderr, "no error output")
+
+ t.end()
+ }
+ )
+})
+
+test("cleanup", function (t) {
+ t.pass("cleaned up")
+ rimraf.sync(pkg)
+ server.close()
+ t.end()
+})
diff --git a/deps/npm/test/tap/adduser-always-auth.js b/deps/npm/test/tap/adduser-always-auth.js
index 8311096c2e..6a451b451c 100644
--- a/deps/npm/test/tap/adduser-always-auth.js
+++ b/deps/npm/test/tap/adduser-always-auth.js
@@ -25,7 +25,7 @@ function mocks(server) {
}
test("npm login", function (t) {
- mr({port : common.port, mocks : mocks}, function (s) {
+ mr({port : common.port, plugin : mocks}, function (er, s) {
var runner = common.npm(
[
"login",
@@ -61,7 +61,7 @@ test("npm login", function (t) {
})
test("npm login --always-auth", function (t) {
- mr({port : common.port, mocks : mocks}, function (s) {
+ mr({port : common.port, plugin : mocks}, function (er, s) {
var runner = common.npm(
[
"login",
@@ -98,7 +98,7 @@ test("npm login --always-auth", function (t) {
})
test("npm login --no-always-auth", function (t) {
- mr({port : common.port, mocks : mocks}, function (s) {
+ mr({port : common.port, plugin : mocks}, function (er, s) {
var runner = common.npm(
[
"login",
diff --git a/deps/npm/test/tap/adduser-legacy-auth.js b/deps/npm/test/tap/adduser-legacy-auth.js
index 56303903ff..abed823872 100644
--- a/deps/npm/test/tap/adduser-legacy-auth.js
+++ b/deps/npm/test/tap/adduser-legacy-auth.js
@@ -47,7 +47,7 @@ test("setup", function (t) {
})
test("npm login", function (t) {
- mr({port : common.port, mocks : mocks}, function (s) {
+ mr({port : common.port, plugin : mocks}, function (er, s) {
var runner = common.npm(
[
"login",
diff --git a/deps/npm/test/tap/bugs.js b/deps/npm/test/tap/bugs.js
index 845a42123e..51ba5d3fe1 100644
--- a/deps/npm/test/tap/bugs.js
+++ b/deps/npm/test/tap/bugs.js
@@ -25,7 +25,7 @@ test("setup", function (t) {
})
test("npm bugs underscore", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
"bugs", "underscore",
"--registry=" + common.registry,
@@ -45,7 +45,7 @@ test("npm bugs underscore", function (t) {
})
test("npm bugs optimist - github (https://)", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
"bugs", "optimist",
"--registry=" + common.registry,
@@ -65,7 +65,7 @@ test("npm bugs optimist - github (https://)", function (t) {
})
test("npm bugs npm-test-peer-deps - no repo", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
"bugs", "npm-test-peer-deps",
"--registry=" + common.registry,
@@ -85,7 +85,7 @@ test("npm bugs npm-test-peer-deps - no repo", function (t) {
})
test("npm bugs test-repo-url-http - non-github (http://)", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
"bugs", "test-repo-url-http",
"--registry=" + common.registry,
@@ -105,7 +105,7 @@ test("npm bugs test-repo-url-http - non-github (http://)", function (t) {
})
test("npm bugs test-repo-url-https - non-github (https://)", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
"bugs", "test-repo-url-https",
"--registry=" + common.registry,
@@ -125,7 +125,7 @@ test("npm bugs test-repo-url-https - non-github (https://)", function (t) {
})
test("npm bugs test-repo-url-ssh - non-github (ssh://)", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
"bugs", "test-repo-url-ssh",
"--registry=" + common.registry,
diff --git a/deps/npm/test/tap/cache-shasum-fork.js b/deps/npm/test/tap/cache-shasum-fork.js
index 383f08c715..77d7938078 100644
--- a/deps/npm/test/tap/cache-shasum-fork.js
+++ b/deps/npm/test/tap/cache-shasum-fork.js
@@ -16,7 +16,7 @@ test("mock reg", function (t) {
mkdirp.sync(cache)
rimraf.sync(cwd)
mkdirp.sync(path.join(cwd, "node_modules"))
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
server = s
t.pass("ok")
t.end()
diff --git a/deps/npm/test/tap/cache-shasum.js b/deps/npm/test/tap/cache-shasum.js
index c7784ecff5..f86037cc80 100644
--- a/deps/npm/test/tap/cache-shasum.js
+++ b/deps/npm/test/tap/cache-shasum.js
@@ -13,7 +13,7 @@ var server
test("mock reg", function (t) {
rimraf.sync(cache)
mkdirp.sync(cache)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
server = s
t.pass("ok")
t.end()
diff --git a/deps/npm/test/tap/circular-dep.js b/deps/npm/test/tap/circular-dep.js
index 60487dd381..fd5817dbc0 100644
--- a/deps/npm/test/tap/circular-dep.js
+++ b/deps/npm/test/tap/circular-dep.js
@@ -35,7 +35,7 @@ function setup (cb) {
process.chdir(path.resolve(pkg, "minimist"))
fs.mkdirSync(path.resolve(pkg, "minimist/node_modules"))
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
server = s
npm.load({
loglevel: "silent",
diff --git a/deps/npm/test/tap/dedupe.js b/deps/npm/test/tap/dedupe.js
index c0a648e738..b203e5e393 100644
--- a/deps/npm/test/tap/dedupe.js
+++ b/deps/npm/test/tap/dedupe.js
@@ -33,7 +33,7 @@ test("dedupe finds the common module and moves it up one level", function (t) {
function setup (cb) {
process.chdir(path.join(__dirname, "dedupe"))
- mr(common.port, function (s) { // create mock registry.
+ 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)
diff --git a/deps/npm/test/tap/dist-tag.js b/deps/npm/test/tap/dist-tag.js
new file mode 100644
index 0000000000..08a5ca438c
--- /dev/null
+++ b/deps/npm/test/tap/dist-tag.js
@@ -0,0 +1,195 @@
+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 pkg = path.resolve(__dirname, "dist-tag")
+var server
+
+var scoped = {
+ name : "@scoped/pkg",
+ version : "1.1.1"
+}
+
+function mocks (server) {
+ // ls current package
+ server.get("/-/package/@scoped%2fpkg/dist-tags")
+ .reply(200, { latest : "1.0.0", a : "0.0.1", b : "0.5.0" })
+
+ // ls named package
+ server.get("/-/package/@scoped%2fanother/dist-tags")
+ .reply(200, { latest : "2.0.0", a : "0.0.2", b : "0.6.0" })
+
+ // add c
+ server.get("/-/package/@scoped%2fanother/dist-tags")
+ .reply(200, { latest : "2.0.0", a : "0.0.2", b : "0.6.0" })
+ server.put("/-/package/@scoped%2fanother/dist-tags/c", "\"7.7.7\"")
+ .reply(200, { latest : "7.7.7", a : "0.0.2", b : "0.6.0", c : "7.7.7" })
+
+ // set same version
+ server.get("/-/package/@scoped%2fanother/dist-tags")
+ .reply(200, { latest : "2.0.0", b : "0.6.0" })
+
+ // rm
+ server.get("/-/package/@scoped%2fanother/dist-tags")
+ .reply(200, { latest : "2.0.0", a : "0.0.2", b : "0.6.0", c : "7.7.7" })
+ server.delete("/-/package/@scoped%2fanother/dist-tags/c")
+ .reply(200, { c : "7.7.7" })
+
+ // rm
+ server.get("/-/package/@scoped%2fanother/dist-tags")
+ .reply(200, { latest : "4.0.0" })
+}
+
+test("setup", function (t) {
+ mkdirp(pkg, function (er) {
+ t.ifError(er, pkg + " made successfully")
+
+ mr({port : common.port, plugin : mocks}, function (er, s) {
+ server = s
+
+ fs.writeFile(
+ path.join(pkg, "package.json"),
+ JSON.stringify(scoped),
+ function (er) {
+ t.ifError(er, "wrote package.json")
+ t.end()
+ }
+ )
+ })
+ })
+})
+
+test("npm dist-tags ls in current package", function (t) {
+ common.npm(
+ [
+ "dist-tags", "ls",
+ "--registry", common.registry,
+ "--loglevel", "silent"
+ ],
+ { cwd : pkg },
+ function (er, code, stdout, stderr) {
+ t.ifError(er, "npm access")
+ t.notOk(code, "exited OK")
+ t.notOk(stderr, "no error output")
+ t.equal(stdout, "a: 0.0.1\nb: 0.5.0\nlatest: 1.0.0\n")
+
+ t.end()
+ }
+ )
+})
+
+test("npm dist-tags ls on named package", function (t) {
+ common.npm(
+ [
+ "dist-tags",
+ "ls", "@scoped/another",
+ "--registry", common.registry,
+ "--loglevel", "silent"
+ ],
+ { cwd : pkg },
+ function (er, code, stdout, stderr) {
+ t.ifError(er, "npm access")
+ t.notOk(code, "exited OK")
+ t.notOk(stderr, "no error output")
+ t.equal(stdout, "a: 0.0.2\nb: 0.6.0\nlatest: 2.0.0\n")
+
+ t.end()
+ }
+ )
+})
+
+test("npm dist-tags add @scoped/another@7.7.7 c", function (t) {
+ common.npm(
+ [
+ "dist-tags",
+ "add", "@scoped/another@7.7.7", "c",
+ "--registry", common.registry,
+ "--loglevel", "silent"
+ ],
+ { cwd : pkg },
+ function (er, code, stdout, stderr) {
+ t.ifError(er, "npm access")
+ t.notOk(code, "exited OK")
+ t.notOk(stderr, "no error output")
+ t.equal(stdout, "+c: @scoped/another@7.7.7\n")
+
+ t.end()
+ }
+ )
+})
+
+test("npm dist-tags set same version", function (t) {
+ common.npm(
+ [
+ "dist-tag",
+ "set", "@scoped/another@0.6.0", "b",
+ "--registry", common.registry,
+ "--loglevel", "warn"
+ ],
+ { cwd : pkg },
+ function (er, code, stdout, stderr) {
+ t.ifError(er, "npm access")
+ t.notOk(code, "exited OK")
+ t.equal(
+ stderr,
+ "npm WARN dist-tag add b is already set to version 0.6.0\n",
+ "warned about setting same version"
+ )
+ t.notOk(stdout, "only expecting warning message")
+
+ t.end()
+ }
+ )
+})
+
+test("npm dist-tags rm @scoped/another c", function (t) {
+ common.npm(
+ [
+ "dist-tags",
+ "rm", "@scoped/another", "c",
+ "--registry", common.registry,
+ "--loglevel", "silent"
+ ],
+ { cwd : pkg },
+ function (er, code, stdout, stderr) {
+ t.ifError(er, "npm access")
+ t.notOk(code, "exited OK")
+ t.notOk(stderr, "no error output")
+ t.equal(stdout, "-c: @scoped/another@7.7.7\n")
+
+ t.end()
+ }
+ )
+})
+
+test("npm dist-tags rm @scoped/another nonexistent", function (t) {
+ common.npm(
+ [
+ "dist-tags",
+ "rm", "@scoped/another", "nonexistent",
+ "--registry", common.registry,
+ "--loglevel", "silent"
+ ],
+ { cwd : pkg },
+ function (er, code, stdout, stderr) {
+ t.ifError(er, "npm dist-tag")
+ t.ok(code, "expecting nonzero exit code")
+ t.notOk(stderr, "no error output")
+ t.notOk(stdout, "not expecting output")
+
+ t.end()
+ }
+ )
+})
+
+test("cleanup", function (t) {
+ t.pass("cleaned up")
+ rimraf.sync(pkg)
+ server.close()
+ t.end()
+})
diff --git a/deps/npm/test/tap/false_name.js b/deps/npm/test/tap/false_name.js
index b02eafec99..26ecb5b84b 100644
--- a/deps/npm/test/tap/false_name.js
+++ b/deps/npm/test/tap/false_name.js
@@ -28,7 +28,7 @@ test("setup", function(t) {
test("not every pkg.name can be required", function (t) {
t.plan(3)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
"install", ".",
"--cache", cache,
diff --git a/deps/npm/test/tap/get.js b/deps/npm/test/tap/get.js
index fbc88161e6..983243025b 100644
--- a/deps/npm/test/tap/get.js
+++ b/deps/npm/test/tap/get.js
@@ -36,7 +36,7 @@ var server
var mocks = {
"get": {
- "/@bigco%2fsample/1.2.3" : [200, JSON.stringify(BIGCO_SAMPLE)]
+ "/@bigco%2fsample/1.2.3" : [200, BIGCO_SAMPLE]
}
}
@@ -49,9 +49,10 @@ function getCachePath (uri) {
test("setup", function (t) {
mkdirp.sync(CACHE_DIR)
- mr({port: common.port, mocks: mocks}, function (s) {
- npm.load({cache: CACHE_DIR, registry: common.registry}, function (err) {
- t.ifError(err)
+ mr({port: common.port, mocks: mocks}, function (er, s) {
+ t.ifError(er)
+ npm.load({cache: CACHE_DIR, registry: common.registry}, function (er) {
+ t.ifError(er)
server = s
t.end()
})
@@ -110,7 +111,7 @@ test("basic request", function (t) {
var scoped = common.registry + "/@bigco%2fsample/1.2.3"
npm.registry.get(scoped, PARAMS, function (er, data) {
t.ifError(er, "loaded all metadata")
- t.deepEqual(data.name, "@bigco/sample")
+ t.equal(data.name, "@bigco/sample")
fs.stat(getCachePath(scoped), function (er) {
t.ifError(er, "scoped cache data written")
})
diff --git a/deps/npm/test/tap/ignore-shrinkwrap.js b/deps/npm/test/tap/ignore-shrinkwrap.js
index 6744a868a2..a8efa81917 100644
--- a/deps/npm/test/tap/ignore-shrinkwrap.js
+++ b/deps/npm/test/tap/ignore-shrinkwrap.js
@@ -16,7 +16,7 @@ var customMocks = {
}
test("ignore-shrinkwrap: using the option", function (t) {
- mr({port: common.port, mocks: customMocks}, function (s) {
+ mr({port: common.port, mocks: customMocks}, function (err, s) {
s._server.on("request", function (req) {
switch (req.url) {
case "/shrinkwrap.js":
@@ -35,7 +35,7 @@ test("ignore-shrinkwrap: using the option", function (t) {
})
test("ignore-shrinkwrap: NOT using the option", function (t) {
- mr({port: common.port, mocks: customMocks}, function (s) {
+ mr({port: common.port, mocks: customMocks}, function (err, s) {
s._server.on("request", function (req) {
switch (req.url) {
case "/shrinkwrap.js":
diff --git a/deps/npm/test/tap/install-cli-unicode.js b/deps/npm/test/tap/install-cli-unicode.js
index 7318deffca..004229cf88 100644
--- a/deps/npm/test/tap/install-cli-unicode.js
+++ b/deps/npm/test/tap/install-cli-unicode.js
@@ -15,7 +15,7 @@ var EXEC_OPTS = {
test("does not use unicode with --unicode false", function (t) {
t.plan(5)
- mr(common.port, function (s) {
+ 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")
@@ -28,7 +28,7 @@ test("does not use unicode with --unicode false", function (t) {
})
test("cleanup", function (t) {
- mr(common.port, function (s) {
+ 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")
diff --git a/deps/npm/test/tap/install-save-exact.js b/deps/npm/test/tap/install-save-exact.js
index ef785f240e..b2feaa1b46 100644
--- a/deps/npm/test/tap/install-save-exact.js
+++ b/deps/npm/test/tap/install-save-exact.js
@@ -17,7 +17,7 @@ test("setup", function (t) {
test("\"npm install --save --save-exact\" should install local pkg", function (t) {
resetPackageJSON(pkg)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
npm.load({
cache: pkg + "/cache",
loglevel: "silent",
@@ -46,7 +46,7 @@ test("\"npm install --save --save-exact\" should install local pkg", function (t
test("\"npm install --save-dev --save-exact\" should install local pkg", function (t) {
resetPackageJSON(pkg)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
npm.load({
cache: pkg + "/cache",
loglevel: "silent",
diff --git a/deps/npm/test/tap/install-save-prefix.js b/deps/npm/test/tap/install-save-prefix.js
index d4efef4b61..1844a2c294 100644
--- a/deps/npm/test/tap/install-save-prefix.js
+++ b/deps/npm/test/tap/install-save-prefix.js
@@ -17,7 +17,7 @@ test("setup", function (t) {
test("npm install --save with default save-prefix should install local pkg versioned to allow minor updates", function (t) {
resetPackageJSON(pkg)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
npm.load({
cache: pkg + "/cache",
loglevel: "silent",
@@ -43,7 +43,7 @@ test("npm install --save with default save-prefix should install local pkg versi
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(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
npm.load({
cache: pkg + "/cache",
loglevel: "silent",
@@ -69,7 +69,7 @@ test("npm install --save-dev with default save-prefix should install local pkg t
test("npm install --save with \"~\" save-prefix should install local pkg versioned to allow patch updates", function (t) {
resetPackageJSON(pkg)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
npm.load({
cache: pkg + "/cache",
loglevel: "silent",
@@ -96,7 +96,7 @@ test("npm install --save with \"~\" save-prefix should install local pkg version
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(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
npm.load({
cache: pkg + "/cache",
loglevel: "silent",
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 d0f86aa77a..9df8123ed3 100644
--- a/deps/npm/test/tap/install-with-dev-dep-duplicate.js
+++ b/deps/npm/test/tap/install-with-dev-dep-duplicate.js
@@ -13,7 +13,7 @@ var desiredResultsPath = path.resolve(pkg, "desired-ls-results.json")
test("prefers version from dependencies over devDependencies", function (t) {
t.plan(1)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
setup(function (err) {
if (err) return t.fail(err)
diff --git a/deps/npm/test/tap/ls-depth-cli.js b/deps/npm/test/tap/ls-depth-cli.js
index 89c4cc3547..b449804cdf 100644
--- a/deps/npm/test/tap/ls-depth-cli.js
+++ b/deps/npm/test/tap/ls-depth-cli.js
@@ -20,7 +20,7 @@ test("setup", function (t) {
cleanup()
mkdirp.sync(pkg + "/cache")
mkdirp.sync(pkg + "/tmp")
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
var cmd = ["install", "--registry=" + common.registry]
common.npm(cmd, opts, function (er, c) {
if (er) throw er
diff --git a/deps/npm/test/tap/ls-depth-unmet.js b/deps/npm/test/tap/ls-depth-unmet.js
index 37a0cb5fea..ddd9f3baf9 100644
--- a/deps/npm/test/tap/ls-depth-unmet.js
+++ b/deps/npm/test/tap/ls-depth-unmet.js
@@ -23,7 +23,7 @@ test("setup", function (t) {
cleanup()
mkdirp.sync(cache)
mkdirp.sync(tmp)
- mr(common.port, function (s) {
+ 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
diff --git a/deps/npm/test/tap/ls-l-depth-0.js b/deps/npm/test/tap/ls-l-depth-0.js
index c11f4826e4..8833c17219 100644
--- a/deps/npm/test/tap/ls-l-depth-0.js
+++ b/deps/npm/test/tap/ls-l-depth-0.js
@@ -31,7 +31,7 @@ var EXEC_OPTS = {
test("setup", function (t) {
setup()
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
server = s
t.end()
diff --git a/deps/npm/test/tap/noargs-install-config-save.js b/deps/npm/test/tap/noargs-install-config-save.js
index 328da7d17b..15613d7a72 100644
--- a/deps/npm/test/tap/noargs-install-config-save.js
+++ b/deps/npm/test/tap/noargs-install-config-save.js
@@ -52,7 +52,7 @@ test("does not update the package.json with empty arguments", function (t) {
writePackageJson()
t.plan(1)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
var child = createChild([npm, "install"])
child.on("close", function () {
var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8"))
@@ -67,7 +67,7 @@ test("updates the package.json (adds dependencies) with an argument", function (
writePackageJson()
t.plan(1)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
var child = createChild([npm, "install", "underscore"])
child.on("close", function () {
var text = JSON.stringify(fs.readFileSync(pkg + "/package.json", "utf8"))
diff --git a/deps/npm/test/tap/outdated-color.js b/deps/npm/test/tap/outdated-color.js
index 4e90277fe2..1a04980a3a 100644
--- a/deps/npm/test/tap/outdated-color.js
+++ b/deps/npm/test/tap/outdated-color.js
@@ -28,7 +28,7 @@ function ansiTrim (str) {
// it"s not running in a tty
test("does not use ansi styling", function (t) {
t.plan(4)
- mr(common.port, function (s) { // create mock registry.
+ mr({port : common.port}, function (er, s) { // create mock registry.
common.npm(
[
"outdated",
diff --git a/deps/npm/test/tap/outdated-depth.js b/deps/npm/test/tap/outdated-depth.js
index 112f363aa5..213c4d60f4 100644
--- a/deps/npm/test/tap/outdated-depth.js
+++ b/deps/npm/test/tap/outdated-depth.js
@@ -25,7 +25,7 @@ test("outdated depth zero", function (t) {
process.chdir(pkg)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
npm.load({
cache: cache
, loglevel: "silent"
diff --git a/deps/npm/test/tap/outdated-include-devdependencies.js b/deps/npm/test/tap/outdated-include-devdependencies.js
index bdb656ff18..9425d5b8a0 100644
--- a/deps/npm/test/tap/outdated-include-devdependencies.js
+++ b/deps/npm/test/tap/outdated-include-devdependencies.js
@@ -13,7 +13,7 @@ mkdirp.sync(cache)
test("includes devDependencies in outdated", function (t) {
process.chdir(pkg)
- mr(common.port, function (s) {
+ 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])
diff --git a/deps/npm/test/tap/outdated-json.js b/deps/npm/test/tap/outdated-json.js
index b874f28e69..e02675afeb 100644
--- a/deps/npm/test/tap/outdated-json.js
+++ b/deps/npm/test/tap/outdated-json.js
@@ -35,7 +35,7 @@ test("it should log json data", function (t) {
cleanup()
process.chdir(pkg)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
npm.load({
cache: pkg + "/cache",
loglevel: "silent",
diff --git a/deps/npm/test/tap/outdated-long.js b/deps/npm/test/tap/outdated-long.js
new file mode 100644
index 0000000000..db011ab655
--- /dev/null
+++ b/deps/npm/test/tap/outdated-long.js
@@ -0,0 +1,70 @@
+var path = require("path")
+
+var mr = require("npm-registry-mock")
+var rimraf = require("rimraf")
+var test = require("tap").test
+
+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")
+
+test("it should not throw", function (t) {
+ cleanup()
+ process.chdir(pkg)
+
+ 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" ] ]
+
+ 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()
+ })
+ })
+ })
+ })
+})
+
+test("cleanup", function (t) {
+ cleanup()
+ t.end()
+})
+
+function cleanup () {
+ rimraf.sync(nodeModules)
+ rimraf.sync(cache)
+}
diff --git a/deps/npm/test/tap/outdated-new-versions.js b/deps/npm/test/tap/outdated-new-versions.js
index cb7eaa4733..0608824dcb 100644
--- a/deps/npm/test/tap/outdated-new-versions.js
+++ b/deps/npm/test/tap/outdated-new-versions.js
@@ -16,7 +16,7 @@ test("dicovers new versions in outdated", function (t) {
process.chdir(pkg)
t.plan(2)
- mr(common.port, function (s) {
+ 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++) {
diff --git a/deps/npm/test/tap/outdated-notarget.js b/deps/npm/test/tap/outdated-notarget.js
index f1032eab37..6058ddee42 100644
--- a/deps/npm/test/tap/outdated-notarget.js
+++ b/deps/npm/test/tap/outdated-notarget.js
@@ -14,7 +14,7 @@ var mr = require("npm-registry-mock")
test("outdated-target: if no viable version is found, show error", function (t) {
t.plan(1)
setup()
- mr({port: common.port}, function (s) {
+ mr({port : common.port}, function (er, s) {
npm.load({ cache: cache, registry: common.registry}, function () {
npm.commands.update(function (er) {
t.equal(er.code, "ETARGET")
diff --git a/deps/npm/test/tap/outdated-private.js b/deps/npm/test/tap/outdated-private.js
index b0f84647f2..7e43be7a54 100644
--- a/deps/npm/test/tap/outdated-private.js
+++ b/deps/npm/test/tap/outdated-private.js
@@ -21,7 +21,7 @@ test("setup", function (t) {
test("outdated ignores private modules", function (t) {
t.plan(3)
process.chdir(pkg)
- mr({ port : common.port }, function (s) {
+ mr({ port : common.port }, function (err, s) {
npm.load(
{
loglevel : "silent",
diff --git a/deps/npm/test/tap/outdated.js b/deps/npm/test/tap/outdated.js
index 9f4b14d1f3..8e7ebe5687 100644
--- a/deps/npm/test/tap/outdated.js
+++ b/deps/npm/test/tap/outdated.js
@@ -31,7 +31,7 @@ test("it should not throw", function (t) {
console.log = function () {
output.push.apply(output, arguments)
}
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
npm.load({
cache: "cache",
loglevel: "silent",
diff --git a/deps/npm/test/tap/owner.js b/deps/npm/test/tap/owner.js
index 47dc255d87..938c216657 100644
--- a/deps/npm/test/tap/owner.js
+++ b/deps/npm/test/tap/owner.js
@@ -53,6 +53,8 @@ function mocks (server) {
.reply(200, {_id:"underscore",_rev:2,maintainers:[jashkenas,othiym23]})
// test 4
+ server.get("/underscore")
+ .reply(200, {_id:"underscore",_rev:2,maintainers:[jashkenas,othiym23]})
server.put(
"/underscore/-rev/2",
{_id:"underscore",_rev:2,maintainers:[jashkenas]},
@@ -71,7 +73,7 @@ test("setup", function (t) {
t.ifError(err, "npm cache clean ran without error")
t.notOk(code, "npm cache clean exited cleanly")
- mr({ port : common.port, mocks : mocks }, function (s) {
+ mr({ port : common.port, plugin : mocks }, function (err, s) {
server = s
t.end()
})
diff --git a/deps/npm/test/tap/peer-deps-invalid.js b/deps/npm/test/tap/peer-deps-invalid.js
index 098f3ccb18..eb2ce8bb6f 100644
--- a/deps/npm/test/tap/peer-deps-invalid.js
+++ b/deps/npm/test/tap/peer-deps-invalid.js
@@ -1,5 +1,4 @@
var common = require("../common-tap")
-var fs = require("fs")
var path = require("path")
var test = require("tap").test
var rimraf = require("rimraf")
@@ -9,9 +8,6 @@ var pkg = path.resolve(__dirname, "peer-deps-invalid")
var cache = path.resolve(pkg, "cache")
var nodeModules = path.resolve(pkg, "node_modules")
-var okFile = fs.readFileSync(path.join(pkg, "file-ok.js"), "utf8")
-var failFile = fs.readFileSync(path.join(pkg, "file-fail.js"), "utf8")
-
test("installing dependencies that have conflicting peerDependencies", function (t) {
rimraf.sync(nodeModules)
rimraf.sync(cache)
@@ -19,11 +15,12 @@ test("installing dependencies that have conflicting peerDependencies", function
var customMocks = {
"get": {
- "/ok.js": [200, okFile],
- "/invalid.js": [200, failFile]
+ "/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 (s) { // create mock registry.
+ 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
diff --git a/deps/npm/test/tap/peer-deps-toplevel.js b/deps/npm/test/tap/peer-deps-toplevel.js
index 30ab657dc8..1cb71bc19b 100644
--- a/deps/npm/test/tap/peer-deps-toplevel.js
+++ b/deps/npm/test/tap/peer-deps-toplevel.js
@@ -11,7 +11,7 @@ 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(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
setup(function (err) {
t.ifError(err, "setup ran successfully")
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 eb000782f9..9c8daf84fb 100644
--- a/deps/npm/test/tap/peer-deps-without-package-json.js
+++ b/deps/npm/test/tap/peer-deps-without-package-json.js
@@ -9,7 +9,6 @@ var pkg = path.resolve(__dirname, "peer-deps-without-package-json")
var cache = path.resolve(pkg, "cache")
var nodeModules = path.resolve(pkg, "node_modules")
-var js = fs.readFileSync(path.join(pkg, "file-js.js"), "utf8")
test("installing a peerDependencies-using package without a package.json present (GH-3049)", function (t) {
rimraf.sync(nodeModules)
@@ -20,21 +19,27 @@ test("installing a peerDependencies-using package without a package.json present
var customMocks = {
"get": {
- "/ok.js": [200, js]
+ "/ok.js": [200, path.join(pkg, "file-js.js")]
}
}
- mr({port: common.port, mocks: customMocks}, function (s) { // create mock registry.
+ mr({port: common.port, mocks: customMocks}, function (err, s) {
+ t.ifError(err, "mock registry booted")
npm.load({
registry: common.registry,
cache: cache
}, function () {
npm.install(common.registry + "/ok.js", function (err) {
- if (err) {
- t.fail(err)
- } else {
- t.ok(fs.existsSync(path.join(nodeModules, "/npm-test-peer-deps-file")))
- t.ok(fs.existsSync(path.join(nodeModules, "/underscore")))
- }
+ t.ifError(err, "installed ok.js")
+
+ t.ok(
+ fs.existsSync(path.join(nodeModules, "/npm-test-peer-deps-file")),
+ "passive peer dep installed"
+ )
+ t.ok(
+ fs.existsSync(path.join(nodeModules, "/underscore")),
+ "underscore installed"
+ )
+
t.end()
s.close() // shutdown mock registry.
})
diff --git a/deps/npm/test/tap/peer-deps.js b/deps/npm/test/tap/peer-deps.js
index 6e60fc1032..8fa28a54f6 100644
--- a/deps/npm/test/tap/peer-deps.js
+++ b/deps/npm/test/tap/peer-deps.js
@@ -11,7 +11,7 @@ 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(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
setup(function (err) {
if (err) return t.fail(err)
diff --git a/deps/npm/test/tap/prune.js b/deps/npm/test/tap/prune.js
index 24edf5e618..f46f6c7eb2 100644
--- a/deps/npm/test/tap/prune.js
+++ b/deps/npm/test/tap/prune.js
@@ -16,7 +16,7 @@ EXEC_OPTS.env.npm_config_depth = "Infinity"
var server
test("reg mock", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
server = s
t.pass("registry mock started")
t.end()
diff --git a/deps/npm/test/tap/publish-access-scoped.js b/deps/npm/test/tap/publish-access-scoped.js
new file mode 100644
index 0000000000..e734ebfd78
--- /dev/null
+++ b/deps/npm/test/tap/publish-access-scoped.js
@@ -0,0 +1,84 @@
+var fs = require("fs")
+var path = require("path")
+
+var test = require("tap").test
+var mkdirp = require("mkdirp")
+var rimraf = require("rimraf")
+var nock = require("nock")
+
+var npm = require("../../")
+var common = require("../common-tap.js")
+
+var pkg = path.join(__dirname, "publish-access")
+
+// 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"), function () {
+ var configuration = {
+ cache : path.join(pkg, "cache"),
+ loglevel : "silent",
+ registry : common.registry
+ }
+
+ npm.load(configuration, next)
+ })
+
+ function next (er) {
+ t.ifError(er, "npm loaded successfully")
+
+ process.chdir(pkg)
+ fs.writeFile(
+ path.join(pkg, "package.json"),
+ JSON.stringify({
+ name: "@bigco/publish-access",
+ version: "1.2.5"
+ }),
+ "ascii",
+ function (er) {
+ t.ifError(er)
+
+ t.pass("setup done")
+ t.end()
+ }
+ )
+ }
+})
+
+test("scoped packages pass public access if set", function (t) {
+ var put = nock(common.registry)
+ .put("/@bigco%2fpublish-access")
+ .reply(201, verify)
+
+ npm.config.set("access", "public")
+ npm.commands.publish([], false, function (er) {
+ t.ifError(er, "published without error")
+
+ put.done()
+ t.end()
+ })
+
+ function verify (_, body) {
+ t.doesNotThrow(function () {
+ var parsed = JSON.parse(body)
+ t.equal(parsed.access, "public", "access level is correct")
+ }, "converted body back into object")
+
+ return {ok: true}
+ }
+})
+
+test("cleanup", function (t) {
+ process.chdir(__dirname)
+ rimraf(pkg, function (er) {
+ t.ifError(er)
+
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js b/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js
new file mode 100644
index 0000000000..4d39b00b16
--- /dev/null
+++ b/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js
@@ -0,0 +1,70 @@
+var fs = require("fs")
+var path = require("path")
+
+var test = require("tap").test
+var mkdirp = require("mkdirp")
+var rimraf = require("rimraf")
+
+var npm = require("../../")
+var common = require("../common-tap.js")
+
+var pkg = path.join(__dirname, "publish-access-unscoped")
+
+// 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"), function () {
+ var configuration = {
+ cache : path.join(pkg, "cache"),
+ loglevel : "silent",
+ registry : common.registry
+ }
+
+ npm.load(configuration, next)
+ })
+
+ function next (er) {
+ t.ifError(er, "npm loaded successfully")
+
+ process.chdir(pkg)
+ fs.writeFile(
+ path.join(pkg, "package.json"),
+ JSON.stringify({
+ name: "publish-access",
+ version: "1.2.5"
+ }),
+ "ascii",
+ function (er) {
+ t.ifError(er)
+
+ t.pass("setup done")
+ t.end()
+ }
+ )
+ }
+})
+
+test("unscoped packages cannot be restricted", function (t) {
+ npm.config.set("access", "restricted")
+ npm.commands.publish([], false, function (er) {
+ t.ok(er, "got an error back")
+ t.equal(er.message, "Can't restrict access to unscoped packages.")
+
+ t.end()
+ })
+})
+
+test("cleanup", function (t) {
+ process.chdir(__dirname)
+ rimraf(pkg, function (er) {
+ t.ifError(er)
+
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/publish-access-unscoped.js b/deps/npm/test/tap/publish-access-unscoped.js
new file mode 100644
index 0000000000..023bfba5f2
--- /dev/null
+++ b/deps/npm/test/tap/publish-access-unscoped.js
@@ -0,0 +1,84 @@
+var fs = require("fs")
+var path = require("path")
+
+var test = require("tap").test
+var mkdirp = require("mkdirp")
+var rimraf = require("rimraf")
+var nock = require("nock")
+
+var npm = require("../../")
+var common = require("../common-tap.js")
+
+var pkg = path.join(__dirname, "publish-access-unscoped")
+
+// 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"), function () {
+ var configuration = {
+ cache : path.join(pkg, "cache"),
+ loglevel : "silent",
+ registry : common.registry
+ }
+
+ npm.load(configuration, next)
+ })
+
+ function next (er) {
+ t.ifError(er, "npm loaded successfully")
+
+ process.chdir(pkg)
+ fs.writeFile(
+ path.join(pkg, "package.json"),
+ JSON.stringify({
+ name: "publish-access",
+ version: "1.2.5"
+ }),
+ "ascii",
+ function (er) {
+ t.ifError(er)
+
+ t.pass("setup done")
+ t.end()
+ }
+ )
+ }
+})
+
+test("unscoped packages can be explicitly set as public", function (t) {
+ var put = nock(common.registry)
+ .put("/publish-access")
+ .reply(201, verify)
+
+ npm.config.set("access", "public")
+ npm.commands.publish([], false, function (er) {
+ t.ifError(er, "published without error")
+
+ put.done()
+ t.end()
+ })
+
+ function verify (_, body) {
+ t.doesNotThrow(function () {
+ var parsed = JSON.parse(body)
+ t.equal(parsed.access, "public", "access level is correct")
+ }, "converted body back into object")
+
+ return {ok: true}
+ }
+})
+
+test("cleanup", function (t) {
+ process.chdir(__dirname)
+ rimraf(pkg, function (er) {
+ t.ifError(er)
+
+ t.end()
+ })
+})
diff --git a/deps/npm/test/tap/repo.js b/deps/npm/test/tap/repo.js
index caae7d3c3f..565842b9a6 100644
--- a/deps/npm/test/tap/repo.js
+++ b/deps/npm/test/tap/repo.js
@@ -27,7 +27,7 @@ test("setup", function (t) {
})
test("npm repo underscore", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
'repo', 'underscore',
'--registry=' + common.registry,
@@ -46,7 +46,7 @@ test("npm repo underscore", function (t) {
test('npm repo optimist - github (https://)', function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
'repo', 'optimist',
'--registry=' + common.registry,
@@ -64,7 +64,7 @@ test('npm repo optimist - github (https://)', function (t) {
})
test("npm repo npm-test-peer-deps - no repo", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
'repo', 'npm-test-peer-deps',
'--registry=' + common.registry,
@@ -79,7 +79,7 @@ test("npm repo npm-test-peer-deps - no repo", function (t) {
})
test("npm repo test-repo-url-http - non-github (http://)", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
'repo', 'test-repo-url-http',
'--registry=' + common.registry,
@@ -97,7 +97,7 @@ test("npm repo test-repo-url-http - non-github (http://)", function (t) {
})
test("npm repo test-repo-url-https - non-github (https://)", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
'repo', 'test-repo-url-https',
'--registry=' + common.registry,
@@ -115,7 +115,7 @@ test("npm repo test-repo-url-https - non-github (https://)", function (t) {
})
test("npm repo test-repo-url-ssh - non-github (ssh://)", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
common.npm([
'repo', 'test-repo-url-ssh',
'--registry=' + common.registry,
diff --git a/deps/npm/test/tap/search.js b/deps/npm/test/tap/search.js
index d4c5669733..fc3bd86e08 100644
--- a/deps/npm/test/tap/search.js
+++ b/deps/npm/test/tap/search.js
@@ -56,7 +56,7 @@ var mocks = {
test("No previous cache, init cache triggered by first search", function(t) {
cleanupCache()
- mr({ port: common.port, mocks: mocks.allFutureUpdatedOnly }, function (s) {
+ mr({ port: common.port, plugin: mocks.allFutureUpdatedOnly }, function (err, s) {
common.npm([
"search", "do not do extra search work on my behalf",
"--registry", common.registry,
@@ -88,7 +88,7 @@ test("previous cache, _updated set, should trigger since request", function(t) {
m(server)
})
}
- mr({ port: common.port, mocks: m }, function (s) {
+ mr({ port: common.port, plugin: m }, function (err, s) {
common.npm([
"search", "do not do extra search work on my behalf",
"--registry", common.registry,
@@ -129,7 +129,7 @@ var searches = [
searches.forEach(function(search) {
test(search.description + " search in color", function(t) {
cleanupCache()
- mr({ port: common.port, mocks: mocks.all }, function (s) {
+ mr({ port: common.port, plugin: mocks.all }, function (er, s) {
common.npm([
"search", search.term,
"--registry", common.registry,
diff --git a/deps/npm/test/tap/shrinkwrap-dev-dependency.js b/deps/npm/test/tap/shrinkwrap-dev-dependency.js
index fc606cf40b..379a0d908c 100644
--- a/deps/npm/test/tap/shrinkwrap-dev-dependency.js
+++ b/deps/npm/test/tap/shrinkwrap-dev-dependency.js
@@ -13,7 +13,7 @@ var desiredResultsPath = path.resolve(pkg, "desired-shrinkwrap-results.json")
test("shrinkwrap doesn't strip out the dependency", function (t) {
t.plan(1)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
setup({ production: true }, function (err) {
if (err) return t.fail(err)
diff --git a/deps/npm/test/tap/shrinkwrap-empty-deps.js b/deps/npm/test/tap/shrinkwrap-empty-deps.js
index 6be67af744..80ab820983 100644
--- a/deps/npm/test/tap/shrinkwrap-empty-deps.js
+++ b/deps/npm/test/tap/shrinkwrap-empty-deps.js
@@ -14,7 +14,7 @@ test("returns a list of removed items", function (t) {
cleanup()
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
setup(function () {
npm.shrinkwrap([], function (err) {
if (err) return t.fail(err)
diff --git a/deps/npm/test/tap/shrinkwrap-scoped-auth.js b/deps/npm/test/tap/shrinkwrap-scoped-auth.js
index d6bb6b8d6a..79414ccd22 100644
--- a/deps/npm/test/tap/shrinkwrap-scoped-auth.js
+++ b/deps/npm/test/tap/shrinkwrap-scoped-auth.js
@@ -33,7 +33,7 @@ function mocks (server) {
}
test("setup", function (t) {
- mr({ port : common.port, mocks : mocks }, function (s) {
+ mr({ port : common.port, plugin : mocks }, function (err, s) {
server = s
t.ok(s, "set up mock registry")
setup()
diff --git a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js
index 75f1765fc7..8a01260725 100644
--- a/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js
+++ b/deps/npm/test/tap/shrinkwrap-shared-dev-dependency.js
@@ -13,7 +13,7 @@ var desiredResultsPath = path.resolve(pkg, "desired-shrinkwrap-results.json")
test("shrinkwrap doesn't strip out the shared dependency", function (t) {
t.plan(1)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
setup(function (err) {
if (err) return t.fail(err)
diff --git a/deps/npm/test/tap/sorted-package-json.js b/deps/npm/test/tap/sorted-package-json.js
index 1dec1d2ae1..6853cf3020 100644
--- a/deps/npm/test/tap/sorted-package-json.js
+++ b/deps/npm/test/tap/sorted-package-json.js
@@ -24,7 +24,7 @@ test("sorting dependencies", function (t) {
var before = JSON.parse(fs.readFileSync(packageJson).toString())
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
// underscore is already in the package.json,
// but --save will trigger a rewrite with sort
var child = spawn(node, [npm, "install", "--save", "underscore@1.3.3"], {
diff --git a/deps/npm/test/tap/uninstall-package.js b/deps/npm/test/tap/uninstall-package.js
index a0ba4c6c1a..f62aa24dfc 100644
--- a/deps/npm/test/tap/uninstall-package.js
+++ b/deps/npm/test/tap/uninstall-package.js
@@ -8,7 +8,7 @@ var test = require("tap").test
test("returns a list of removed items", function (t) {
t.plan(1)
- mr(common.port, function (s) {
+ mr({port : common.port}, function (er, s) {
setup(function () {
npm.install(".", function (err) {
if (err) return t.fail(err)
diff --git a/deps/npm/test/tap/update-index.js b/deps/npm/test/tap/update-index.js
index f592ecb070..cf305900c7 100644
--- a/deps/npm/test/tap/update-index.js
+++ b/deps/npm/test/tap/update-index.js
@@ -15,7 +15,7 @@ var server
function setup (t, mock) {
mkdirp.sync(CACHE_DIR)
- mr({ port: common.port, mocks: mock }, function (s) {
+ mr({ port: common.port, plugin: mock }, function (er, s) {
npm.load({ cache: CACHE_DIR, registry: common.registry }, function (err) {
t.ifError(err, "no error")
server = s
@@ -25,10 +25,11 @@ function setup (t, mock) {
}
function cleanup (t) {
- server.close()
- rimraf.sync(PKG_DIR)
+ server.close(function () {
+ rimraf.sync(PKG_DIR)
- t.end()
+ t.end()
+ })
}
test("setup basic", function (t) {
@@ -75,14 +76,14 @@ test("request auth success", function (t) {
test("cleanup auth", cleanup)
var mocks = {
- basic: function (server) {
- server.get("/-/all").reply(200, allMock)
+ basic: function (mock) {
+ mock.get("/-/all").reply(200, allMock)
},
- auth: function (server) {
+ auth: function (mock) {
var littleBobbyTablesAuth = new Buffer("bobby:tables").toString("base64")
var auth = "Basic " + littleBobbyTablesAuth
- server.get("/-/all", { authorization: auth }).reply(200, allMock)
- server.get("/-/all").reply(401, {
+ mock.get("/-/all", { authorization: auth }).reply(200, allMock)
+ mock.get("/-/all").reply(401, {
error: "unauthorized",
reason: "You are not authorized to access this db."
})
diff --git a/deps/npm/test/tap/update-save.js b/deps/npm/test/tap/update-save.js
index 5f871b26c8..d246fa8a45 100644
--- a/deps/npm/test/tap/update-save.js
+++ b/deps/npm/test/tap/update-save.js
@@ -17,7 +17,8 @@ var EXEC_OPTS = {
stdio: "ignore",
env: {
"npm_config_registry": common.registry,
- "npm_config_loglevel": "verbose"
+ "npm_config_loglevel": "verbose",
+ "npm_config_save_prefix": "^"
}
}
@@ -37,7 +38,7 @@ var s // mock server reference
test("setup", function (t) {
resetPackage()
- mr(common.port, function (server) {
+ mr({port : common.port}, function (er, server) {
npm.load({cache: CACHE_DIR, registry: common.registry}, function (err) {
t.ifError(err)
s = server
diff --git a/deps/npm/test/tap/url-dependencies.js b/deps/npm/test/tap/url-dependencies.js
index a77b3d380d..a24e70e900 100644
--- a/deps/npm/test/tap/url-dependencies.js
+++ b/deps/npm/test/tap/url-dependencies.js
@@ -45,7 +45,7 @@ function tarballWasFetched(output){
}
function performInstall (t, cb) {
- mr({port: common.port, mocks: mockRoutes}, function (s) {
+ mr({port: common.port, mocks: mockRoutes}, function (er, s) {
var opts = {
cwd : pkg,
env: {
diff --git a/deps/npm/test/tap/view.js b/deps/npm/test/tap/view.js
index c36abfe1f6..5d371d6308 100644
--- a/deps/npm/test/tap/view.js
+++ b/deps/npm/test/tap/view.js
@@ -32,6 +32,13 @@ test("setup", function (t) {
t.end()
})
+function plugin (server) {
+ server
+ .get("/biscuits")
+ .many()
+ .reply(404, {"error": "version not found"})
+}
+
test("npm view . in global mode", function (t) {
process.chdir(t1dir)
common.npm([
@@ -77,7 +84,7 @@ test("npm view . with no package.json", function(t) {
test("npm view . with no published package", function (t) {
process.chdir(t3dir)
- mr(common.port, function (s) {
+ mr({port : common.port, plugin : plugin}, function (er, s) {
common.npm([
"view"
, "."
@@ -94,7 +101,7 @@ test("npm view . with no published package", function (t) {
test("npm view .", function (t) {
process.chdir(t2dir)
- mr(common.port, function (s) {
+ mr({port : common.port, plugin : plugin}, function (er, s) {
common.npm([
"view"
, "."
@@ -112,7 +119,7 @@ test("npm view .", function (t) {
test("npm view . select fields", function (t) {
process.chdir(t2dir)
- mr(common.port, function (s) {
+ mr({port : common.port, plugin : plugin}, function (er, s) {
common.npm([
"view"
, "."
@@ -130,7 +137,7 @@ test("npm view . select fields", function (t) {
test("npm view .@<version>", function (t) {
process.chdir(t2dir)
- mr(common.port, function (s) {
+ mr({port : common.port, plugin : plugin}, function (er, s) {
common.npm([
"view"
, ".@0.0.0"
@@ -148,7 +155,7 @@ test("npm view .@<version>", function (t) {
test("npm view .@<version> --json", function (t) {
process.chdir(t2dir)
- mr(common.port, function (s) {
+ mr({port : common.port, plugin : plugin}, function (er, s) {
common.npm([
"view"
, ".@0.0.0"
@@ -166,7 +173,7 @@ test("npm view .@<version> --json", function (t) {
})
test("npm view <package name>", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port, plugin : plugin}, function (er, s) {
common.npm([
"view"
, "underscore"
@@ -183,7 +190,7 @@ test("npm view <package name>", function (t) {
})
test("npm view <package name> --global", function(t) {
- mr(common.port, function(s) {
+ mr({port : common.port, plugin : plugin}, function (er, s) {
common.npm([
"view"
, "underscore"
@@ -202,7 +209,7 @@ test("npm view <package name> --global", function(t) {
test("npm view <package name> --json", function(t) {
t.plan(3)
- mr(common.port, function (s) {
+ mr({port : common.port, plugin : plugin}, function (er, s) {
common.npm([
"view"
, "underscore"
@@ -226,7 +233,7 @@ test("npm view <package name> --json", function(t) {
})
test("npm view <package name> <field>", function (t) {
- mr(common.port, function (s) {
+ mr({port : common.port, plugin : plugin}, function (er, s) {
common.npm([
"view"
, "underscore"