diff --git a/Makefile b/Makefile index 6c148eb2cdaa..b3087f804a44 100644 --- a/Makefile +++ b/Makefile @@ -151,15 +151,17 @@ test-debugger: all test-npm: node rm -rf npm-cache npm-tmp npm-prefix mkdir npm-cache npm-tmp npm-prefix - cd deps/npm ; npm_config_cache="$(shell pwd)/npm-cache" \ + cd deps/npm ; export PATH="$(shell pwd):/bin:/usr/bin" ; \ + npm_config_cache="$(shell pwd)/npm-cache" \ npm_config_prefix="$(shell pwd)/npm-prefix" \ npm_config_tmp="$(shell pwd)/npm-tmp" \ - ../../node cli.js install - cd deps/npm ; npm_config_cache="$(shell pwd)/npm-cache" \ + node cli.js install + cd deps/npm ; export PATH="$(shell pwd):/bin:/usr/bin" ; \ + npm_config_cache="$(shell pwd)/npm-cache" \ npm_config_prefix="$(shell pwd)/npm-prefix" \ npm_config_tmp="$(shell pwd)/npm-tmp" \ - ../../node cli.js run-script test-all && \ - ../../node cli.js prune --prod && \ + node cli.js run-script test-all && \ + node cli.js prune --prod && \ cd ../.. && \ rm -rf npm-cache npm-tmp npm-prefix diff --git a/deps/npm/.mailmap b/deps/npm/.mailmap new file mode 100644 index 000000000000..c90d44748681 --- /dev/null +++ b/deps/npm/.mailmap @@ -0,0 +1,31 @@ +Arlo Breault +Alex K. Wolfe +Andrew Lunny +Benjamin Coe +Brian White +Charlie Robbins +Dalmais Maxence +David Beitey +Domenic Denicola +Einar Otto Stangvik +Evan Lucas +Faiq Raza +Forbes Lindesay +Forrest L. Norvell +Gabriel Barros +Geoff Flarity +Isaac Z. Schlueter +Jake Verbaten +James Sanders +Jason Smith +Kris Windham +Lin Clark +Maciej Małecki +Maximilian Antoni +Maxim Bogushevich +Max Goodman +Nicolas Morel +Olivier Melcher +Visnu Pitiyanuvath +Will Elwood +Zeke Sikelianos \ No newline at end of file diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 3c0c0b0ba89e..7155393ab411 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 -Steve Steiner -Mikeal Rogers -Aaron Blohowiak -Martyn Smith -Mathias Pettersson -Brian Hammond -Charlie Robbins -Francisco Treacy -Cliffano Subagio -Christian Eager -Dav Glass -Alex K. Wolfe -James Sanders -Reid Burke -Arlo Breault -Timo Derstappen -Bradley Meck -Bart Teeuwisse -Ben Noordhuis -Tor Valamo -Whyme.Lyu <5longluna@gmail.com> -Olivier Melcher -Tomaž Muraus Evan Meagher Orlando Vazquez +Kai Chen George Miroshnykov Geoff Flarity +Max Goodman Pete Kruckenberg Laurie Harper +Neil Gentleman +Kris Kowal +Alex Gorbatchev +Shawn Wildermuth +Wesley de Souza +Patrick Pfeiffer +yoyoyogi +Paul Miller +Jérémy Lal +J. Tangelder +seebees +Anders Janmyr +Jean Lauliac +Carl Lange +Chris Meyers +Andrey Kislyuk +Jan Lehnardt +Ludwig Magnusson +Thorsten Lorenz +Stuart P. Bentley +wmertens +Johan Sköld +Nick Santos +Stuart Knightley +Terin Stock +Niggler +Faiq Raza +Paolo Fragomeni +Thomas Torp +Jaakko Manninen +Sam Mikes +Luke Arduini +Larz Conwell +Marcel Klehr +Robert Kowalski Chris Wong -Max Goodman +Forbes Lindesay Scott Bronson +Vaz Allen Federico Romero +Jake Verbaten Visnu Pitiyanuvath +Schabse Laks Irakli Gozalishvili +Florian Margaine Mark Cahill Zearin Iain Sproat Trent Mick Felix Geisendörfer -Conny Brunnkvist +Julian Gruber +Benjamin Coe +Alex Ford +Matt Hickford +Sean McGivern +C J Silverio +Mat Tyndall +Robin Tweedie +Tauren Mills +Miroslav Bajtoš +Isaac Z. Schlueter +Ron Martinez +David Glasser +Steve Steiner +Kazuhito Hokamura +Gianluca Casati +Mikeal Rogers +Tristan Davies +Aaron Blohowiak +David Volm +Martyn Smith +Lin Clark +Charlie Robbins +Ben Page +Francisco Treacy +Jeff Jo +Johan Nordberg +Cliffano Subagio +martinvd +Ian Babrou +Christian Eager +Di Wu +Mathias Bynens +Matt McClure +Jameson Little +Matt Lunn +Conny Brunnkvist +Alexey Kreschuk Will Elwood +elisee +Dean Landolt +Robert Gieseke Oleg Efimov +François Frisch Martin Cooper -Jameson Little +Jann Horn cspotcode -Maciej Małecki +Maciej Małecki Stephen Sugden +Forrest L Norvell +Karsten Tinnefeld +Bryan Burgers +David Beitey +Evan You +Zach Pomerantz +Mark J. Titorenko +Chris Williams +Oddur Sigurdsson +sudodoki +Eric Mill +Mick Thompson +Gabriel Barros +Felix Rabe +KevinSheedy +Aleksey Smolenchuk +Ed Morley +Blaine Bublitz +Andrey Fedorov +Trevor Burnham +Daijiro Wachi +Alan Shaw +TJ Holowaychuk +Luke Arduini +Nicholas Kinsey +Michael Budde +Paulo Cesar +Jason Smith +Elan Shanker Gautham Pai +Jon Spencer David Trejo +Jason Diamond Paul Vorbach +Maximilian Antoni George Ornbo Tim Oxley Tyler Green +Dave Pacheco atomizer +Michael Hayes +Chris Dickinson +Bradley Meck +GeJ +Andrew Terris +Michael Nisi +Luc Thevenard +fengmk2 +Aria Stewart +Adam Meadows +Charlie Rudolph +Chulki Lee +不四 +Thom Blake +Jess Martin +Spain Train +Alex Rodionov +Matt Colyer Rod Vagg +Evan You Christian Howe +bitspill Andrew Lunny +Gabriel Falkenberg Henrik Hodne +Alexej Yaroshevich Adam Blackburn +Quim Calpe Kris Windham Jens Grunert Joost-Wim Boekesteijn -Dalmais Maxence +Dalmais Maxence Marcus Ekwall +Steve Mason +Wil Moore III +Sergey Belov +Tom Huang +CamilleM Aaron Stacy +Sébastien Santoro Phillip Howell +Evan Lucas Domenic Denicola +Quinn Slack James Halliday +Alex Kocharin Jeremy Cantrell +Evan Lucas +Trent Mick Ribettes -Einar Otto Stangvik Don Park +Einar Otto Stangvik Kei Son +Dav Glass +Alex K. Wolfe +James Sanders +Reid Burke +Arlo Breault +Timo Derstappen +Bart Teeuwisse +Ben Noordhuis +Tor Valamo +Whyme.Lyu <5longluna@gmail.com> +Daniel Santiago +Denis Gladkikh +Andrew Horton +Zeke Sikelianos +Dylan Greene Nicolas Morel +Franck Cuny Mark Dube +dead_horse +Yeonghoon Park Nathan Rajlich +Kenan Yildirim +Rafael de Oleza Maxim Bogushevich -Justin Beckwith +Laurie Voss +Mikola Lysenko Meaglin +Rebecca Turner +Yazhong Liu Ben Evans +Hunter Loftis Nathan Zadoks -Brian White +Peter Richardson +Brian White +Jussi Kalliokoski Jed Schmidt +Filip Weiss Ian Livingstone -Patrick Pfeiffer -Paul Miller -seebees -Carl Lange -Jan Lehnardt -Alexey Kreschuk -Di Wu -Florian Margaine -Forbes Lindesay -Ian Babrou -Jaakko Manninen -Johan Nordberg -Johan Sköld -Larz Conwell -Luke Arduini -Marcel Klehr -Mathias Bynens -Matt Lunn -Matt McClure -Nirk Niggler -Paolo Fragomeni -Jake Verbaten (Raynos) -Robert Kowalski -Schabse Laks -Stuart Knightley -Stuart P. Bentley -Vaz Allen -elisee -Evan You -Wil Moore III -Dylan Greene -zeke -Andrew Horton -Denis Gladkikh -Daniel Santiago -Alex Kocharin -Evan Lucas -Steve Mason -Quinn Slack -Sébastien Santoro -CamilleM -Tom Huang -Sergey Belov -Younghoon Park -Yazhong Liu -Mikola Lysenko -Rafael de Oleza -Yeonghoon Park -Franck Cuny -Alan Shaw -Alex Rodionov -Alexej Yaroshevich -Elan Shanker -François Frisch -Gabriel Falkenberg -Jason Diamond -Jess Martin -Jon Spencer -Matt Colyer -Matt McClure -Maximilian Antoni -Nicholas Kinsey -Paulo Cesar -Quim Calpe -Robert Gieseke -Spain Train -TJ Holowaychuk -Thom Blake -Trevor Burnham -bitspill -Neil Gentleman +timoweiss +Christopher Hiller +Olivier Melcher +Tomaž Muraus diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index b73d83ac7054..248de8908d2e 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 34d4b62de275..15655f3e5cfe 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 000000000000..85db7e654186 --- /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 [] + npm access restricted [] + + npm access add [] + npm access rm [] + + npm access ls [] + npm access edit [] + +## 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=`. + +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 000000000000..b8eabe71577b --- /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 @ [] + npm dist-tag rm + npm dist-tag ls [] + +## 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 @ + +When installing dependencies, a preferred tagged version may be specified: + + npm install --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 @` vs `npm install @`. + +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 . + +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 30e816c7fdf2..8c447d0df9c4 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 [--tag ] - npm publish [--tag ] + npm publish [--tag ] [--access ] + npm publish [--tag ] [--access ] ## DESCRIPTION @@ -29,6 +29,12 @@ specifying a different default registry or using a `npm-scope(7)` in the name @` will install this version. By default, `npm publish` updates and `npm install` installs the `latest` tag. +* `[--access ]` + 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 05637f21db43..e17afcd259d6 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 28a1c9334fb0..d7118d4e581a 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 1a54ec06b3c9..933c23a64aab 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 7aaaffb8d6be..96dda6b9f584 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 96c62cced613..4cbfbdc8bc81 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 a9953056c971..ca7b622ca2ea 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -126,7 +126,7 @@

If you have a complaint about a package in the public npm registry, and cannot resolve it with the package owner, please email -support@npmjs.com and explain the situation.

+support@npmjs.com and explain the situation.

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.

@@ -169,5 +169,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html index d1b9fb5bca0b..b1033738ad73 100644 --- a/deps/npm/html/doc/api/npm-bin.html +++ b/deps/npm/html/doc/api/npm-bin.html @@ -28,5 +28,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html index a7f3c3e4ad37..47b11ef1410f 100644 --- a/deps/npm/html/doc/api/npm-bugs.html +++ b/deps/npm/html/doc/api/npm-bugs.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html index 952856f86917..aa7c2eea3f0c 100644 --- a/deps/npm/html/doc/api/npm-cache.html +++ b/deps/npm/html/doc/api/npm-cache.html @@ -42,5 +42,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html index 16292985c888..45af01d28362 100644 --- a/deps/npm/html/doc/api/npm-commands.html +++ b/deps/npm/html/doc/api/npm-commands.html @@ -36,5 +36,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html index 758eef37ace7..bea72420ca0c 100644 --- a/deps/npm/html/doc/api/npm-config.html +++ b/deps/npm/html/doc/api/npm-config.html @@ -57,5 +57,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html index eb965608ef4a..b00c11cf0c23 100644 --- a/deps/npm/html/doc/api/npm-deprecate.html +++ b/deps/npm/html/doc/api/npm-deprecate.html @@ -47,5 +47,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html index 25fa5167f4b1..c478fbbcf59c 100644 --- a/deps/npm/html/doc/api/npm-docs.html +++ b/deps/npm/html/doc/api/npm-docs.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html index f7e777d86d2f..1f74d8f3dcde 100644 --- a/deps/npm/html/doc/api/npm-edit.html +++ b/deps/npm/html/doc/api/npm-edit.html @@ -36,5 +36,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html index fb8b36e1b293..4e8703563f5e 100644 --- a/deps/npm/html/doc/api/npm-explore.html +++ b/deps/npm/html/doc/api/npm-explore.html @@ -31,5 +31,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html index 3612ae521fdc..bb188c1ec24f 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 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html index dc32dfdbe5ab..6dcc3e2deaae 100644 --- a/deps/npm/html/doc/api/npm-init.html +++ b/deps/npm/html/doc/api/npm-init.html @@ -39,5 +39,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html index ef095d462cb0..f2f89c95a95e 100644 --- a/deps/npm/html/doc/api/npm-install.html +++ b/deps/npm/html/doc/api/npm-install.html @@ -32,5 +32,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html index 7a80c5297dcf..195701e8991d 100644 --- a/deps/npm/html/doc/api/npm-link.html +++ b/deps/npm/html/doc/api/npm-link.html @@ -42,5 +42,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html index 3882694cf03a..67c5216dcb4c 100644 --- a/deps/npm/html/doc/api/npm-load.html +++ b/deps/npm/html/doc/api/npm-load.html @@ -37,5 +37,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html index 8b0bc0c6fb79..3d80294fe099 100644 --- a/deps/npm/html/doc/api/npm-ls.html +++ b/deps/npm/html/doc/api/npm-ls.html @@ -63,5 +63,5 @@

global

       - + diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html index eeff9318d0ae..a2c442d0c5b9 100644 --- a/deps/npm/html/doc/api/npm-outdated.html +++ b/deps/npm/html/doc/api/npm-outdated.html @@ -28,5 +28,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html index 6fff13787514..97e3671e35a8 100644 --- a/deps/npm/html/doc/api/npm-owner.html +++ b/deps/npm/html/doc/api/npm-owner.html @@ -47,5 +47,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html index 13a1ed8f5de3..763199e991c0 100644 --- a/deps/npm/html/doc/api/npm-pack.html +++ b/deps/npm/html/doc/api/npm-pack.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html index 22398c50df19..f4e6a703d6dd 100644 --- a/deps/npm/html/doc/api/npm-prefix.html +++ b/deps/npm/html/doc/api/npm-prefix.html @@ -29,5 +29,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html index 6ee9e7d59f48..6fb8718ca80b 100644 --- a/deps/npm/html/doc/api/npm-prune.html +++ b/deps/npm/html/doc/api/npm-prune.html @@ -30,5 +30,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html index dccedcab6ce0..bbbe2a10216c 100644 --- a/deps/npm/html/doc/api/npm-publish.html +++ b/deps/npm/html/doc/api/npm-publish.html @@ -46,5 +46,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html index 1203b177a220..7edc466ea38a 100644 --- a/deps/npm/html/doc/api/npm-rebuild.html +++ b/deps/npm/html/doc/api/npm-rebuild.html @@ -30,5 +30,5 @@

CONFIGURATION

       - + diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html index 718f55aae626..b5a41a08db4c 100644 --- a/deps/npm/html/doc/api/npm-repo.html +++ b/deps/npm/html/doc/api/npm-repo.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html index e3c90034fef9..5be2e68cf854 100644 --- a/deps/npm/html/doc/api/npm-restart.html +++ b/deps/npm/html/doc/api/npm-restart.html @@ -52,5 +52,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html index 5231b853fdb6..744df599fc91 100644 --- a/deps/npm/html/doc/api/npm-root.html +++ b/deps/npm/html/doc/api/npm-root.html @@ -29,5 +29,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html index c9877f401251..639a71fcac9d 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 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html index 8d116367aefb..63121ffe26bd 100644 --- a/deps/npm/html/doc/api/npm-search.html +++ b/deps/npm/html/doc/api/npm-search.html @@ -53,5 +53,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html index 08aec3538cf8..de43ebc0a338 100644 --- a/deps/npm/html/doc/api/npm-shrinkwrap.html +++ b/deps/npm/html/doc/api/npm-shrinkwrap.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html index 74e8271a541b..b10a6c499f6a 100644 --- a/deps/npm/html/doc/api/npm-start.html +++ b/deps/npm/html/doc/api/npm-start.html @@ -28,5 +28,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html index 018b57ea3b24..83e258bdd86f 100644 --- a/deps/npm/html/doc/api/npm-stop.html +++ b/deps/npm/html/doc/api/npm-stop.html @@ -28,5 +28,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index bc145f5f058a..104f5b733c24 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -36,5 +36,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html index b799e3a7ff40..dd9677e76e76 100644 --- a/deps/npm/html/doc/api/npm-test.html +++ b/deps/npm/html/doc/api/npm-test.html @@ -30,5 +30,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html index 51720cc7d851..f1fa1c3bccb2 100644 --- a/deps/npm/html/doc/api/npm-uninstall.html +++ b/deps/npm/html/doc/api/npm-uninstall.html @@ -30,5 +30,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html index 004ca7ed7f14..3e0c4ab2efda 100644 --- a/deps/npm/html/doc/api/npm-unpublish.html +++ b/deps/npm/html/doc/api/npm-unpublish.html @@ -33,5 +33,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html index 5feecc4b4634..577101a21bd4 100644 --- a/deps/npm/html/doc/api/npm-update.html +++ b/deps/npm/html/doc/api/npm-update.html @@ -27,5 +27,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html index cdd410a14c61..115f4f90cdd1 100644 --- a/deps/npm/html/doc/api/npm-version.html +++ b/deps/npm/html/doc/api/npm-version.html @@ -32,5 +32,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html index 627f9e65f0b8..73286ece8b24 100644 --- a/deps/npm/html/doc/api/npm-view.html +++ b/deps/npm/html/doc/api/npm-view.html @@ -81,5 +81,5 @@

RETURN VALUE

       - + diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html index c381923cd88b..5d1324d1c1fc 100644 --- a/deps/npm/html/doc/api/npm-whoami.html +++ b/deps/npm/html/doc/api/npm-whoami.html @@ -29,5 +29,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html index ef985922c643..4f41ebe49d2f 100644 --- a/deps/npm/html/doc/api/npm.html +++ b/deps/npm/html/doc/api/npm.html @@ -23,7 +23,7 @@

SYNOPSIS

npm.commands.install(["package"], cb) })

VERSION

-

2.3.0

+

2.5.1

DESCRIPTION

This is the API documentation for npm. To find documentation of the command line @@ -109,5 +109,5 @@

ABBREVS

       - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 3d0a29050009..f5ac65b05a37 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -75,5 +75,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 541ad0c41fa6..01d6b22aacca 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -68,5 +68,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 0f61d5c0be8c..d896b96a1d88 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index ccb59fe06399..ed55e03a71de 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -54,5 +54,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index a32234b9f75f..52efad1940d1 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 2aec65af8a9b..9db76b5b12ef 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -31,5 +31,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index d0d392a29c46..4b3fa05f07d5 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -81,5 +81,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index 69da1503e450..1d6870b04f76 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -42,5 +42,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 7521a212a81a..822f570acf6d 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -66,5 +66,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 2ea5f3de96fb..1cc3f7431d9c 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -63,5 +63,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 886ddd1696f8..574babd59b7a 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index 9fcab6ac14e2..d41abe060275 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 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 0721663da06f..e08070ac5866 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index 6a068adb1557..abf6feae5a7b 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 38e79ce0d600..3bd89c91ed46 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 3584c29b8810..dbc1b6db574c 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 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index eb463a8cd992..998358182813 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -52,5 +52,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index c0586d97b785..09404ec01cca 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -40,5 +40,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index 6a7f9dd7dd9f..f3fb078ea98d 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -239,5 +239,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index b783736d3252..c52434c5910e 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -71,5 +71,5 @@

SYNOPSIS

       - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index d4d80cfdaae8..cdbd56bfd9f0 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -22,7 +22,7 @@

SYNOPSIS

limit the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

-
npm@2.3.0 /path/to/npm
+
npm@2.5.1 /path/to/npm
 └─┬ init-package-json@0.0.4
   └── promzard@0.1.5
 

It will print out extraneous, missing, and invalid packages.

@@ -85,5 +85,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index 81552873ad11..1b1414d71058 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -67,5 +67,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index ed9bcafcb984..9d6e4541ccde 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -49,5 +49,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index c5ebe0798958..cf7fcaed9f38 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index f3926644edbd..98f44e133ddf 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -38,5 +38,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index 03b306dad3ea..247a291d787f 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -39,5 +39,5 @@

SEE ALSO

       - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 6dc61da6583e..23559cacd6b2 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -11,8 +11,8 @@

npm-publish

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

Publishes a package to the registry so that it can be installed by name. See npm-developers(7) for details on what's included in the published package, as @@ -33,6 +33,12 @@

SYNOPSIS

<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.

    @@ -42,6 +48,7 @@

    SYNOPSIS

    SEE ALSO

    • npm-registry(7)
    • +
    • npm-scope(7)
    • npm-adduser(1)
    • npm-owner(1)
    • npm-deprecate(1)
    • @@ -59,5 +66,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index 27252fcbba24..bcf73eca7e55 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -38,5 +38,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index 2ac34d35d436..5eb88eae94a0 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -42,5 +42,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index e107a541c07c..67b397552b43 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html index 617de0c68158..c832eee203c2 100644 --- a/deps/npm/html/doc/cli/npm-rm.html +++ b/deps/npm/html/doc/cli/npm-rm.html @@ -39,5 +39,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index 08adcec8e12a..c9df7b98fd46 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index 508e04025a67..716ad484a440 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 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index 7b613de6b3f0..88ad801bc624 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -49,5 +49,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index 2495eeb3aa4b..21c104f59b54 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -78,7 +78,7 @@

      SYNOPSIS

      "version": "0.0.1", "dependencies": { "C": { - "version": "0.1.0" + "version": "0.0.1" } } } @@ -90,7 +90,7 @@

      SYNOPSIS

      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.

      Using shrinkwrapped packages

      @@ -164,5 +164,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index ae434f6e40fe..58c2c240c17d 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -36,5 +36,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index 6ec03a509909..0ffb3f4d5e38 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -37,5 +37,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index eedbd240c2ef..330378cd81d9 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -34,5 +34,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index 610da6069871..ee69ec0304a3 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index 57757dfa796c..d66caeebd3cc 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -13,6 +13,7 @@

      npm-tag

      Tag a published version

      SYNOPSIS
      npm tag <name>@<version> [<tag>]
       

      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.

      A tag can be used when installing packages as a reference to a version instead @@ -61,5 +62,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index e7eacf8890f5..401a51304e21 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -37,5 +37,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index a0799b36b1ad..ef33583b31c6 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -57,5 +57,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index a277055b1fe2..f31a4f03b847 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -47,5 +47,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index d1e66aa81260..441c0b1a893d 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -42,5 +42,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index dfb537a74d20..bb0fe413ad0e 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -55,5 +55,5 @@

      SYNOPSIS

             - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 8c54064ce522..3fa8beb7890b 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -82,5 +82,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index fbd5544e95dd..eb8274f960ea 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@

      SEE ALSO

             - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index f561c7eb82a8..8651e9893773 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

      npm

      javascript package manager

      SYNOPSIS

      npm <command> [args]
       

      VERSION

      -

      2.3.0

      +

      2.5.1

      DESCRIPTION

      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 @@

      CONTRIBUTIONS

      the issues list or ask on the mailing list.

      BUGS

      When you find issues, please report them:

      @@ -118,7 +118,7 @@

      BUGS

    • web: http://github.com/npm/npm/issues
    • email: -npm-@googlegroups.com
    • +npm-@googlegroups.com

    Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

    @@ -128,7 +128,7 @@

    AUTHOR

    Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me

    +i@izs.me

    SEE ALSO

    Fails if the package name and version combination already exists in the specified registry.

    @@ -31,6 +37,7 @@

    SYNOPSIS

    SEE ALSO

    • npm-registry(7)
    • +
    • npm-scope(7)
    • npm-adduser(1)
    • npm-owner(1)
    • npm-deprecate(1)
    • diff --git a/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html b/deps/npm/html/partial/doc/cli/npm-shrinkwrap.html index 45b646c03004..82bb81f168ba 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 @@

      SYNOPSIS

      "version": "0.0.1", "dependencies": { "C": { - "version": "0.1.0" + "version": "0.0.1" } } } @@ -79,7 +79,7 @@

      SYNOPSIS

      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.

      Using shrinkwrapped packages

      diff --git a/deps/npm/html/partial/doc/cli/npm-tag.html b/deps/npm/html/partial/doc/cli/npm-tag.html index 3d0ff7186146..b12d5de7a4c6 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 @@

      npm-tag

      Tag a published version

      SYNOPSIS
      npm tag <name>@<version> [<tag>]
       

      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.

      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 9410dfdea1fe..e8178c2462e2 100644 --- a/deps/npm/html/partial/doc/cli/npm.html +++ b/deps/npm/html/partial/doc/cli/npm.html @@ -2,7 +2,7 @@

      npm

      javascript package manager

      SYNOPSIS

      npm <command> [args]
       

      VERSION

      -

      2.3.0

      +

      2.5.1

      DESCRIPTION

      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 @@

      CONTRIBUTIONS

      the issues list or ask on the mailing list.

      BUGS

      When you find issues, please report them:

      @@ -107,7 +107,7 @@

      BUGS

    • web: http://github.com/npm/npm/issues
    • email: -npm-@googlegroups.com
    • +npm-@googlegroups.com

    Be sure to include all of the output from the npm command that didn't work as expected. The npm-debug.log file is also helpful to provide.

    @@ -117,7 +117,7 @@

    AUTHOR

    Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me

    +i@izs.me

    SEE ALSO

    • npm-help(1)
    • diff --git a/deps/npm/html/partial/doc/files/npm-json.html b/deps/npm/html/partial/doc/files/npm-json.html index 95f26c6eebf2..cc2b12a5eaed 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 @@

      peerDependencies

      For example:

      {
         "name": "tea-latte",
      -  "version": "1.3.5"
      +  "version": "1.3.5",
         "peerDependencies": {
           "tea": "2.x"
         }
      diff --git a/deps/npm/html/partial/doc/files/package.json.html b/deps/npm/html/partial/doc/files/package.json.html
      index 95f26c6eebf2..cc2b12a5eaed 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 @@ 

      peerDependencies

      For example:

      {
         "name": "tea-latte",
      -  "version": "1.3.5"
      +  "version": "1.3.5",
         "peerDependencies": {
           "tea": "2.x"
         }
      diff --git a/deps/npm/html/partial/doc/index.html b/deps/npm/html/partial/doc/index.html
      index 4fb98e1bd6d4..2d23cb50cc81 100644
      --- a/deps/npm/html/partial/doc/index.html
      +++ b/deps/npm/html/partial/doc/index.html
      @@ -5,6 +5,8 @@ 

      Command Line Documentation

      Using npm on the command line

      npm(1)

      javascript package manager

      +

      npm-access(1)

      +

      Set access level on published packages

      npm-adduser(1)

      Add a registry user account

      npm-bin(1)

      @@ -25,6 +27,8 @@

      npm-dedupe(1)

      Reduce duplication

      npm-deprecate(1)

      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

      npm-edit(1)

      diff --git a/deps/npm/html/partial/doc/misc/npm-config.html b/deps/npm/html/partial/doc/misc/npm-config.html index 1dcbc237ccf5..48f179b43553 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 @@

      Shorthands and Other CLI Niceties

      -m: --message
    • -p, --porcelain: --parseable
    • -reg: --registry
    • -
    • -v: --version
    • -f: --force
    • -desc: --description
    • -S: --save
    • @@ -81,6 +80,15 @@

      Shorthands and Other CLI Niceties

      npm config set foo:port 80

      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
      • @@ -354,7 +362,7 @@

        init-license

        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 @@ -572,7 +580,7 @@

        save-prefix

      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.

      @@ -738,7 +746,6 @@

      viewer

      SEE ALSO

      • npm-config(1)
      • -
      • npm-config(7)
      • npmrc(5)
      • npm-scripts(7)
      • npm-folders(5)
      • diff --git a/deps/npm/html/partial/doc/misc/npm-disputes.html b/deps/npm/html/partial/doc/misc/npm-disputes.html index ab322741a701..4d64370a006f 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 @@

        npm-disputes

        Handling Module

        SYNOPSIS

        1. Get the author email with npm owner ls <pkgname>
        2. -
        3. Email the author, CC support@npmjs.com
        4. +
        5. Email the author, CC support@npmjs.com
        6. After a few weeks, if there's no resolution, we'll sort it out.

        Don't squat on package names. Publish code or move out of the way.

        @@ -40,12 +40,12 @@

        DESCRIPTION

        owner (Bob).
      • Joe emails Bob, explaining the situation as respectfully as possible, and what he would like to do with the module name. He -adds the npm support staff support@npmjs.com to the CC list of +adds the npm support staff support@npmjs.com to the CC list of the email. Mention in the email that Bob can run npm owner add joe foo to add Joe as an owner of the foo package.
      • After a reasonable amount of time, if Bob has not responded, or if Bob and Joe can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks, but extra time is allowed around common holidays.)
      • diff --git a/deps/npm/html/partial/doc/misc/npm-faq.html b/deps/npm/html/partial/doc/misc/npm-faq.html index a015b7383120..a81ae02bd2f4 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 @@

        I get ECONNREFUSED a lot. What'

        To check if the registry is down, open up https://registry.npmjs.org/ in a web browser. This will also tell you if you are just unable to access the internet for some reason.

        -

        If the registry IS down, let us know by emailing support@npmjs.com +

        If the registry IS down, let us know by emailing support@npmjs.com or posting an issue at https://github.com/npm/npm/issues. If it's down for the world (and not just on your local network) then we're probably already being pinged about it.

        diff --git a/deps/npm/html/partial/doc/misc/npm-index.html b/deps/npm/html/partial/doc/misc/npm-index.html index eab0753c9e62..c42ca682cca4 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 @@

        Command Line Documentation

        Using npm on the command line

        npm(1)

        javascript package manager

        +

        npm-access(1)

        +

        Set access level on published packages

        npm-adduser(1)

        Add a registry user account

        npm-bin(1)

        @@ -25,6 +27,8 @@

        npm-dedupe(1)

        Reduce duplication

        npm-deprecate(1)

        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

        npm-edit(1)

        diff --git a/deps/npm/lib/access.js b/deps/npm/lib/access.js new file mode 100644 index 000000000000..a479a971c354 --- /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 []" + + "\nnpm access restricted []" + + "\nnpm access add []" + + "\nnpm access rm []" + + "\nnpm access ls []" + + "\nnpm access edit []" + +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 459a236f5540..ec8eb8e16ce0 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 3d99ab86fa6e..a46e74b5ba33 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 000000000000..48b40202f9a1 --- /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 @ []" + + "\nnpm dist-tag rm " + + "\nnpm dist-tag ls []" + +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 d03ec47b6bbb..8077e8ac9976 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 fe25a8e910c2..f69d81550a36 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 7b34508337ea..3d33a932a3bf 100644 --- a/deps/npm/lib/owner.js +++ b/deps/npm/lib/owner.js @@ -6,8 +6,8 @@ owner.usage = "npm owner add " 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 f179bd42220e..06a3404af9e5 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 " + "\nnpm publish " @@ -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 bc7ec918796d..75da0b2174ff 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 df57c5b34631..ede8482c40c3 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 000000000000..ca6d613210f1 --- /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 4f274c5c913c..2d82982aef37 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 c7620f9a8483..2ea011be6092 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 b3abf17b68a1..df4372e26d6c 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 8f0dc2ba57f9..26d14dfa8c9f 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 5acca82e2de7..94eec9f6ace8 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 1179298c5fec..42f084d72c2a 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 703c795c9b8e..4da294379109 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 1cf1d7c71767..5ebf49d2549f 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 4cb06491007b..22110a3b6dbe 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 716303c41b4b..0b14aef1f60e 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 743a5d027d6a..3ffdf836febf 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 95a8fd2515f0..d2a6c8939756 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 2ed9a5a77857..9707d31b26f0 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 1feecc263c4e..2835d042470a 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 1d905d06b993..c260554e6d94 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 5f29171a9e41..527a9f221a8e 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 524081c93015..3c95739336db 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 0d7f1af03cfb..3a43adc48575 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 d2b6a298d50e..c145287358cd 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 ec355effeb65..db564b23f587 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 86132ed1dd00..9151b68c0e01 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 bbdc916666cd..4f2d713e2e9f 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 a1086ad32221..002fe8887e9c 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 1c503795c6bc..adb6d9d47b36 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 3b39d6847a40..b52ee1cf9582 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 2ebdaa6777f6..d22601a16a96 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 7b22233d5d59..31d1c5cc5333 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 0df825154b87..0ffb5284fa77 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 [\-\-tag ] -npm publish [\-\-tag ] +npm publish [\-\-tag ] [\-\-access ] +npm publish [\-\-tag ] [\-\-access ] .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 @\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 ]\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 1bb1e9acb3a5..b5b89c94234a 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 da8d6c9ad35b..d9cd8441345e 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 010e8153007a..a769e212fca3 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 94a0afa733f2..e2441e445cd7 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 2067f9e55d2b..43f28d4203ba 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 24ff5d9583e6..879fccad2dec 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 3f7d19bd8f12..316060d12c7b 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 5fa9fb16eeff..5d3649e4c38c 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 ced42ecaed73..091271293cfb 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 d2124355c475..8aa6ae2bad2f 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 36f0c26bc585..574281b500c5 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 0a20b4b6d4b2..f0fb715c6d11 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 995ad3990726..eb0549e92403 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 @ [] .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 b398e81eaf02..c0b873fb0bc1 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 5568b48371e5..d79721bfbfd1 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 7f96d4f3676d..906f63069aa3 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 969909482c50..b200ad94c10b 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 2ae02d093747..bbe6784cd6d9 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 0eb7f3118535..187c215d6cab 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 b993e0c9b53f..fe2af1ec0386 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 7b4465aa2902..679426932072 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 [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 27588a2407ed..667f71880405 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 6b7503fefd11..eb8eff117a50 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 15a2839cce5a..88a6c8ca2ca3 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 ee757dfce766..e9725c971350 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 be2522cb49c9..e0f838af9163 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 d04e25d43f82..fbbaa693f68c 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 4dd5a84f7e22..d772f53fa840 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 d7c2ad4f1de0..763c78a6baeb 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 8648eac98e3f..4d55360803f5 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 a9baaf36d9e9..68d29f5e4c98 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 9a2ce6bc82e8..90336149ae3c 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 511791791d16..b69cbf97b3b8 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 2d5bf77c3c12..9db043993ef4 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 68787c89b191..c5ca93a6223c 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 de3d127df64e..df41a3ab8264 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 9e96d44ab3f7..2efa23585901 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 35a993ba8b30..238f3c5da7d4 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 7d95e5751378..13fc83a3a215 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 4aaed71a7349..68c9f1042b78 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 310dfe292e0b..614a551789c3 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 28f77205c545..cf2be78692bb 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 082589b5de88..b79d99604c0f 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 64cc0bad698e..bd0d915a63b1 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 2cacefc5b18d..5c24f61e2826 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 15d5230d170c..5c64d99f8497 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 59bf90d965ab..e87405309db1 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 4fffa3bd960f..895e8ec1e4e5 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 92ce7b1b2fea..042e394128be 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 f3330a5885e5..bba1166e4df6 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 551eedbc12c9..e1e536316b0f 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 c0092c274f42..ef7e8351a345 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 ff969ec023d4..0e9dfdc41ab5 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 0cf637ca2c94..7920b0188fb0 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 48f865db19b2..17c3228a118a 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 eee573b2d88b..81e86907bc34 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 2cf7fe21534e..be5def855533 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 42bbf40c508f..cbd2dae43551 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 cb320ec46ab2..81cda1b89c56 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 1bd3f3890f2e..8fcfc1ebdc66 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 2ae88d142af4..2a945b168c97 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 2ae88d142af4..2a945b168c97 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 d54eaddbe12d..e4a928569e63 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 fc2986b901df..a6b00e811c2a 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 d54eaddbe12d..e4a928569e63 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 ebaf0386c232..3607b86598f9 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 b76ec439c512..a712dce1dac5 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 ba47e45fabb1..76eda3cde23b 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 3d67933982cd..136d670b621d 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 cf6a37cfdde2..45daad65dbaa 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 b3608b57774d..f9c996fb78c6 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 f89b94507e7e..8e53a12a5581 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 2cae9e88c7bb..5a32862abbe4 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 69d880d34f19..b90484d2f4cb 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 73963fe3b377..e3f8b027608b 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 bf239f7e621a..de6a8891854e 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 000000000000..3ae543a94744 --- /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 43ae36c2c40a..b2b846f366be 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 000000000000..548efc679de0 --- /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 8c15c993eaf1..781e683aa866 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 5b9546aabf8a..b83f63b907e2 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 89d1041bd7a8..f04f66f75d11 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 5477079d00f9..53ec26436ca5 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 > - $ cat | strip-ansi > + Usage + strip-ansi > + cat | strip-ansi > -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 4744d9dc3f7f..49fc6f0408a7 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 c60e1d9de6bb..a275672342d3 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 8b1bbf94f0c8..0700813b6797 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 f920c10036b7..6b2de73a2fda 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 068bb00a8251..1b7d2c0638de 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 c15c772241e3..f66857539f62 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 de90de6207a5..f3cadb45e772 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 f65f6463161f..666e9a1c4966 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 (http://npm.im)", + author : "npmbot (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 a35c4831176f..702ae2ea1d31 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//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 801d00f8e9f9..6ea288b0a698 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 000000000000..c642d16f3fb7 --- /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 000000000000..7443cbca2fe8 --- /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 000000000000..46bb33f4d5ae --- /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 000000000000..dbae245ecfc2 --- /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 000000000000..e1e17cde50ba --- /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 000000000000..6c46fc5322a8 --- /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 b0764b610475..2d1c6f6b8231 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 bd5a4caae3fe..e7215bc7802f 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 ea9dcaef7451..348648b2eec1 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 fa969ac22378..c2a7944e9f2d 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 8b42199075c6..cad5154d7f5d 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 000000000000..05eeeb88c2ef --- /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 000000000000..21683f5e5978 --- /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 000000000000..58e97a78753b --- /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 000000000000..7dc6619174ee --- /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 000000000000..ebf40a2ab231 --- /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 000000000000..c2ad10a3bc8f --- /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 000000000000..00606f6a460e --- /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 000000000000..e56ef9a05a0a --- /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 000000000000..089cb281905a --- /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 000000000000..a316048cb774 --- /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 000000000000..e551c45d7b99 --- /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 000000000000..1a4e07096c1c --- /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 000000000000..c505342fa0f6 --- /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 000000000000..883c5401b46f --- /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 000000000000..ad8c540f3231 --- /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 000000000000..4991ffcd3ee1 --- /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.amrom.workers.dev/user/foo#1.2.3": { + name: null, + type: "git", + spec: "ssh://git@notgithub.amrom.workers.dev/user/foo#1.2.3", + raw: "git+ssh://git@notgithub.amrom.workers.dev/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.amrom.workers.dev/user/foo": { + name: null, + type: "git", + spec: "git://notgithub.amrom.workers.dev/user/foo", + raw: "git://notgithub.amrom.workers.dev/user/foo" + }, + + "@foo/bar@git+ssh://notgithub.amrom.workers.dev/user/foo": { + name: "@foo/bar", + scope: "@foo", + spec: "ssh://notgithub.amrom.workers.dev/user/foo", + rawSpec: "git+ssh://notgithub.amrom.workers.dev/user/foo", + raw: "@foo/bar@git+ssh://notgithub.amrom.workers.dev/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 000000000000..48bbdbcf9bf9 --- /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 000000000000..63fd26c10a26 --- /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 000000000000..36ea016db704 --- /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 000000000000..e3c8ba6b591b --- /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 9d4178c572f0..0cd832ad7d17 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//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 000000000000..52ecdda4a4ad --- /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 000000000000..a215c67d9365 --- /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 000000000000..c108b6b3929a --- /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 000000000000..6268a06aaa45 --- /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 000000000000..ff5591dbd2b8 --- /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 000000000000..7c29e1114df4 --- /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 000000000000..980a9a7d9d73 --- /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 10b127505397..b9d9a24d66ef 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 9c547ca010ca..f5da5b2435be 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 cce6fcbc7da7..50b3f93493d3 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 70ff1e93f1e1..203c80004853 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 b21e33f417be..6bb48617df27 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 9292a94c7a12..5a87b64c09ed 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 687df5d7d52b..4116586ee3a2 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 ccb173a09c00..21b70e82fa4f 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 80e59ef52510..53fc9efa995a 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 90e06c13e3c0..0988483f3b07 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 f4e5431b427d..cfaf17384883 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 59d62c2c1a77..8b668f99f726 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 99b8386b592a..3581b83b46e3 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 000000000000..abe627453654 --- /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 25e3dedc7efb..000000000000 --- 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 000000000000..0e54767f540f --- /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 000000000000..3224601ccf05 --- /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 1753cc40b101..6b7fb6d3486e 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 [Buffer](http://nodejs.org/docs/latest/api/buffer.html)< ======= -## License + +## License & 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 d1ea3b5c2e22..7a2f99788e62 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 a5692e03c706..3ffbd6a8ad4a 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 607eea22bc61..ba711f68db12 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 1efd04a97506..39153e614470 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 99d658b8b3fa..000000000000 --- 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 a7ae8ee9b8a3..000000000000 --- 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 1544629b6b3b..000000000000 --- 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 b3bb51763052..70febc05e4f3 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 40ca59eeebdd..047f7e3d5e1e 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 e699a7bdbaa1..78809368472f 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 5f339bf34743..b102d5ab800b 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 36312f4feb2d..0bcd2879012b 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 @@ **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**

        - [**Frequently Asked Questions**](#frequently-asked-questions)

        +- [**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 `')); - expect(boom.response.payload.message).to.not.contain(''); - 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(''); - expect(encoded).to.equal('<script>alert(1)</script>'); - done(); - }); - - it('encodes < and > as named characters', function (done) { - - var encoded = Hoek.escapeHtml(''); + 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(''); + expect(encoded).to.equal('<script>alert(1)</script>'); + done(); + }); + + it('encodes < and > as named characters', function (done) { + + var encoded = Hoek.escapeHtml('