diff --git a/deps/npm/.tern-project b/deps/npm/.tern-project deleted file mode 100644 index d31fd9d88e..0000000000 --- a/deps/npm/.tern-project +++ /dev/null @@ -1,7 +0,0 @@ -{ - "libs": [ - ], - "plugins": { - "node": {} - } -} \ No newline at end of file diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md new file mode 100644 index 0000000000..330c1ac17a --- /dev/null +++ b/deps/npm/CHANGELOG.md @@ -0,0 +1,737 @@ +### v1.4.28 (2014-09-12): + +* [`f4540b6`](https://github.com/npm/npm/commit/f4540b6537a87e653d7495a9ddcf72949fdd4d14) + [#6043](https://github.com/npm/npm/issues/6043) defer rollbacks until just + before the CLI exits ([@isaacs](https://github.com/isaacs)) +* [`1eabfd5`](https://github.com/npm/npm/commit/1eabfd5c03f33c2bd28823714ff02059eeee3899) + [#6043](https://github.com/npm/npm/issues/6043) `slide@1.1.6`: wait until all + callbacks have finished before proceeding + ([@othiym23](https://github.com/othiym23)) + +### v1.4.27 (2014-09-04): + +* [`4cf3c8f`](https://github.com/npm/npm/commit/4cf3c8fd78c9e2693a5f899f50c28f4823c88e2e) + [#6007](https://github.com/npm/npm/issues/6007) `request@2.42.0`: properly set + headers on proxy requests ([@isaacs](https://github.com/isaacs)) +* [`403cb52`](https://github.com/npm/npm/commit/403cb526be1472bb7545fa8e62d4976382cdbbe5) + [#6055](https://github.com/npm/npm/issues/6055) `npmconf@1.1.8`: restore + case-insensitivity of environmental config + ([@iarna](https://github.com/iarna)) + +### v1.4.26 (2014-08-28): + +* [`eceea95`](https://github.com/npm/npm/commit/eceea95c804fa15b18e91c52c0beb08d42a3e77d) + `github-url-from-git@1.4.0`: add support for git+https and git+ssh + ([@stefanbuck](https://github.com/stefanbuck)) +* [`e561758`](https://github.com/npm/npm/commit/e5617587e7d7ab686192391ce55357dbc7fed0a3) + `columnify@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`0c4fab3`](https://github.com/npm/npm/commit/0c4fab372ee76eab01dda83b6749429a8564902e) + `cmd-shim@2.0.0`: upgrade to graceful-fs 3 + ([@ForbesLindesay](https://github.com/ForbesLindesay)) +* [`2d69e4d`](https://github.com/npm/npm/commit/2d69e4d95777671958b5e08d3b2f5844109d73e4) + `github-url-from-username-repo@1.0.0`: accept slashes in branch names + ([@robertkowalski](https://github.com/robertkowalski)) +* [`81f9b2b`](https://github.com/npm/npm/commit/81f9b2bac9d34c223ea093281ba3c495f23f10d1) + ensure lifecycle spawn errors caught properly + ([@isaacs](https://github.com/isaacs)) +* [`bfaab8c`](https://github.com/npm/npm/commit/bfaab8c6e0942382a96b250634ded22454c36b5a) + `npm-registry-client@2.0.7`: properly encode % in passwords + ([@isaacs](https://github.com/isaacs)) +* [`91cfb58`](https://github.com/npm/npm/commit/91cfb58dda851377ec604782263519f01fd96ad8) + doc: Fix 'npm help index' ([@isaacs](https://github.com/isaacs)) + +### v1.4.25 (2014-08-21): + +* [`64c0ec2`](https://github.com/npm/npm/commit/64c0ec241ef5d83761ca8de54acb3c41b079956e) + `npm-registry-client@2.0.6`: Print the notification header returned by the + registry, and make sure status codes are printed without gratuitous quotes + around them. + ([@othiym23](https://github.com/othiym23)) +* [`a8ed12b`](https://github.com/npm/npm/commit/a8ed12b) `tar@1.0.1`: + Add test for removing an extract target immediately after unpacking. + ([@isaacs](https://github.com/isaacs)) +* [`70fd11d`](https://github.com/npm/npm/commit/70fd11d) + `lockfile@1.0.0`: Fix incorrect interaction between `wait`, `stale`, + and `retries` options. Part 2 of race condition leading to `ENOENT` + errors. + ([@isaacs](https://github.com/isaacs)) +* [`0072c4d`](https://github.com/npm/npm/commit/0072c4d) + `fstream@1.0.2`: Fix a double-finish call which can result in excess + FS operations after the `close` event. Part 2 of race condition + leading to `ENOENT` errors. + ([@isaacs](https://github.com/isaacs)) + +### v1.4.24 (2014-08-14): + +* [`9344bd9`](https://github.com/npm/npm/commit/9344bd9b2929b5c399a0e0e0b34d45bce7bc24bb) + doc: add new changelog ([@othiym23](https://github.com/othiym23)) +* [`4be76fd`](https://github.com/npm/npm/commit/4be76fd65e895883c337a99f275ccc8c801adda3) + doc: update version doc to include `pre-*` increment args + ([@isaacs](https://github.com/isaacs)) +* [`e4f2620`](https://github.com/npm/npm/commit/e4f262036080a282ad60e236a9aeebd39fde9fe4) + build: add `make tag` to tag current release as `latest` + ([@isaacs](https://github.com/isaacs)) +* [`ec2596a`](https://github.com/npm/npm/commit/ec2596a7cb626772780b25b0a94a7e547a812bd5) + build: publish with `--tag=v1.4-next` ([@isaacs](https://github.com/isaacs)) +* [`9ee55f8`](https://github.com/npm/npm/commit/9ee55f892b8b473032a43c59912c5684fd1b39e6) + build: add script to output `v1.4-next` publish tag + ([@isaacs](https://github.com/isaacs)) +* [`aecb56f`](https://github.com/npm/npm/commit/aecb56f95a84687ea46920a0b98aaa587fee1568) + build: remove outdated `docpublish` make target + ([@isaacs](https://github.com/isaacs)) +* [`b57a9b7`](https://github.com/npm/npm/commit/b57a9b7ccd13e6b38831ed63595c8ea5763da247) + build: remove unpublish step from `make publish` + ([@isaacs](https://github.com/isaacs)) +* [`2c6acb9`](https://github.com/npm/npm/commit/2c6acb96c71c16106965d5cd829b67195dd673c7) + install: rename `.gitignore` when unpacking foreign tarballs + ([@isaacs](https://github.com/isaacs)) +* [`22f3681`](https://github.com/npm/npm/commit/22f3681923e993a47fc1769ba735bfa3dd138082) + cache: detect non-gzipped tar files more reliably + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha-6 (2014-07-31): + +* [`d987707`](https://github.com/npm/npm/commit/d987707) move fetch into + npm-registry-client ([@othiym23](https://github.com/othiym23)) +* [`9b318e2`](https://github.com/npm/npm/commit/9b318e2) `read-installed@3.0.0` + ([@isaacs](https://github.com/isaacs)) +* [`9d73de7`](https://github.com/npm/npm/commit/9d73de7) remove unnecessary + mkdirps ([@isaacs](https://github.com/isaacs)) +* [`ea547e2`](https://github.com/npm/npm/commit/ea547e2) Bump semver to version 3 + ([@isaacs](https://github.com/isaacs)) +* [`33ccd13`](https://github.com/npm/npm/commit/33ccd13) Don't squash execute + perms in `_git-remotes/` dir ([@adammeadows](https://github.com/adammeadows)) +* [`48fd233`](https://github.com/npm/npm/commit/48fd233) `npm-package-arg@2.0.1` + ([@isaacs](https://github.com/isaacs)) + +### v1.4.23 (2014-07-31): + +* [`8dd11d1`](https://github.com/npm/npm/commit/8dd11d1) update several + dependencies to avoid using `semver`s starting with 0. + +### v1.4.22 (2014-07-31): + +* [`d9a9e84`](https://github.com/npm/npm/commit/d9a9e84) `read-package-json@1.2.4` + ([@isaacs](https://github.com/isaacs)) +* [`86f0340`](https://github.com/npm/npm/commit/86f0340) + `github-url-from-git@1.2.0` ([@isaacs](https://github.com/isaacs)) +* [`a94136a`](https://github.com/npm/npm/commit/a94136a) `fstream@0.1.29` + ([@isaacs](https://github.com/isaacs)) +* [`bb82d18`](https://github.com/npm/npm/commit/bb82d18) `glob@4.0.5` + ([@isaacs](https://github.com/isaacs)) +* [`5b6bcf4`](https://github.com/npm/npm/commit/5b6bcf4) `cmd-shim@1.1.2` + ([@isaacs](https://github.com/isaacs)) +* [`c2aa8b3`](https://github.com/npm/npm/commit/c2aa8b3) license: Cleaned up + legalese with actual lawyer ([@isaacs](https://github.com/isaacs)) +* [`63fe0ee`](https://github.com/npm/npm/commit/63fe0ee) `init-package-json@1.0.0` + ([@isaacs](https://github.com/isaacs)) + +### v2.0.0-alpha-5 (2014-07-22): + +This release bumps up to 2.0 because of this breaking change, which could +potentially affect how your package's scripts are run: + +* [`df4b0e7`](https://github.com/npm/npm/commit/df4b0e7fc1abd9a54f98db75ec9e4d03d37d125b) + [#5518](https://github.com/npm/npm/issues/5518) BREAKING CHANGE: support + passing arguments to `run` scripts ([@bcoe](https://github.com/bcoe)) + +Other changes: + +* [`cd422c9`](https://github.com/npm/npm/commit/cd422c9de510766797c65720d70f085000f50543) + [#5748](https://github.com/npm/npm/issues/5748) link binaries for scoped + packages ([@othiym23](https://github.com/othiym23)) +* [`4c3c778`](https://github.com/npm/npm/commit/4c3c77839920e830991e0c229c3c6a855c914d67) + [#5758](https://github.com/npm/npm/issues/5758) `npm link` includes scope + when linking scoped package ([@fengmk2](https://github.com/fengmk2)) +* [`f9f58dd`](https://github.com/npm/npm/commit/f9f58dd0f5b715d4efa6619f13901916d8f99c47) + [#5707](https://github.com/npm/npm/issues/5707) document generic pre- / + post-commands ([@sudodoki](https://github.com/sudodoki)) +* [`ac7a480`](https://github.com/npm/npm/commit/ac7a4801d80361b41dce4a18f22bcdf75e396000) + [#5406](https://github.com/npm/npm/issues/5406) `npm cache` displays usage + when called without arguments + ([@michaelnisi](https://github.com/michaelnisi)) +* [`f4554e9`](https://github.com/npm/npm/commit/f4554e99d34f77a8a02884493748f7d49a9a9d8b) + Test fixes for Windows ([@isaacs](https://github.com/isaacs)) +* update dependencies ([@othiym23](https://github.com/othiym23)) + + +### v1.5.0-alpha-4 (2014-07-18): + +* fall back to `_auth` config as default auth when using default registry + ([@isaacs](https://github.com/isaacs)) +* support for 'init.version' for those who don't want to deal with semver 0.0.x + oddities ([@rvagg](https://github.com/rvagg)) +* [`be06213`](https://github.com/npm/npm/commit/be06213415f2d51a50d2c792b4cd0d3412a9a7b1) + remove residual support for `win` log level + ([@aterris](https://github.com/aterris)) + +### v1.5.0-alpha-3 (2014-07-17): + +* [`a3a85dd`](https://github.com/npm/npm/commit/a3a85dd004c9245a71ad2f0213bd1a9a90d64cd6) + `--save` scoped packages correctly ([@othiym23](https://github.com/othiym23)) +* [`18a3385`](https://github.com/npm/npm/commit/18a3385bcf8bfb8312239216afbffb7eec759150) + `npm-registry-client@3.0.2` ([@othiym23](https://github.com/othiym23)) +* [`375988b`](https://github.com/npm/npm/commit/375988b9bf5aa5170f06a790d624d31b1eb32c6d) + invalid package names are an early error for optional deps + ([@othiym23](https://github.com/othiym23)) +* consistently use `node-package-arg` instead of arbitrary package spec + splitting ([@othiym23](https://github.com/othiym23)) + +### v1.4.21 (2014-07-14): + +* [`88f51aa`](https://github.com/npm/npm/commit/88f51aa27eb9a958d1fa7ec50fee5cfdedd05110) + fix handling for 301s in `npm-registry-client@2.0.3` + ([@Raynos](https://github.com/Raynos)) + +### v1.5.0-alpha-2 (2014-07-01): + +* [`54cf625`](https://github.com/npm/npm/commit/54cf62534e3331e3f454e609e44f0b944e819283) + fix handling for 301s in `npm-registry-client@3.0.1` + ([@Raynos](https://github.com/Raynos)) +* [`e410861`](https://github.com/npm/npm/commit/e410861c69a3799c1874614cb5b87af8124ff98d) + don't crash if no username set on `whoami` + ([@isaacs](https://github.com/isaacs)) +* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) + respect `--json` for output ([@isaacs](https://github.com/isaacs)) +* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) + outdated: Don't show headings if there's nothing to output + ([@isaacs](https://github.com/isaacs)) +* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) + outdated: Default to `latest` rather than `*` for unspecified deps + ([@isaacs](https://github.com/isaacs)) + +### v1.4.20 (2014-07-02): + +* [`0353dde`](https://github.com/npm/npm/commit/0353ddeaca8171aa7dbdd8102b7e2eb581a86406) + respect `--json` for output ([@isaacs](https://github.com/isaacs)) +* [`b3d112a`](https://github.com/npm/npm/commit/b3d112ae190b984cc1779b9e6de92218f22380c6) + outdated: Don't show headings if there's nothing to output + ([@isaacs](https://github.com/isaacs)) +* [`bb4b90c`](https://github.com/npm/npm/commit/bb4b90c80dbf906a1cb26d85bc0625dc2758acc3) + outdated: Default to `latest` rather than `*` for unspecified deps + ([@isaacs](https://github.com/isaacs)) + +### v1.5.0-alpha-1 (2014-07-01): + +* [`eef4884`](https://github.com/npm/npm/commit/eef4884d6487ee029813e60a5f9c54e67925d9fa) + use the correct piece of the spec for GitHub shortcuts + ([@othiym23](https://github.com/othiym23)) + +### v1.5.0-alpha-0 (2014-07-01): + +* [`7f55057`](https://github.com/npm/npm/commit/7f55057807cfdd9ceaf6331968e666424f48116c) + install scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) + ([@othiym23](https://github.com/othiym23)) +* [`0df7e16`](https://github.com/npm/npm/commit/0df7e16c0232d8f4d036ebf4ec3563215517caac) + publish scoped packages ([#5239](https://github.com/npm/npm/issues/5239)) + ([@othiym23](https://github.com/othiym23)) +* [`0689ba2`](https://github.com/npm/npm/commit/0689ba249b92b4c6279a26804c96af6f92b3a501) + support (and save) --scope=@s config + ([@othiym23](https://github.com/othiym23)) +* [`f34878f`](https://github.com/npm/npm/commit/f34878fc4cee29901e4daf7bace94be01e25cad7) + scope credentials to registry ([@othiym23](https://github.com/othiym23)) +* [`0ac7ca2`](https://github.com/npm/npm/commit/0ac7ca233f7a69751fe4386af6c4daa3ee9fc0da) + capture and store bearer tokens when sent by registry + ([@othiym23](https://github.com/othiym23)) +* [`63c3277`](https://github.com/npm/npm/commit/63c3277f089b2c4417e922826bdc313ac854cad6) + only delete files that are created by npm + ([@othiym23](https://github.com/othiym23)) +* [`4f54043`](https://github.com/npm/npm/commit/4f540437091d1cbca3915cd20c2da83c2a88bb8e) + `npm-package-arg@2.0.0` ([@othiym23](https://github.com/othiym23)) +* [`9e1460e`](https://github.com/npm/npm/commit/9e1460e6ac9433019758481ec031358f4af4cd44) + `read-package-json@1.2.3` ([@othiym23](https://github.com/othiym23)) +* [`719d8ad`](https://github.com/npm/npm/commit/719d8adb9082401f905ff4207ede494661f8a554) + `fs-vacuum@1.2.1` ([@othiym23](https://github.com/othiym23)) +* [`9ef8fe4`](https://github.com/npm/npm/commit/9ef8fe4d6ead3acb3e88c712000e2d3a9480ebec) + `async-some@1.0.0` ([@othiym23](https://github.com/othiym23)) +* [`a964f65`](https://github.com/npm/npm/commit/a964f65ab662107b62a4ca58535ce817e8cca331) + `npmconf@2.0.1` ([@othiym23](https://github.com/othiym23)) +* [`113765b`](https://github.com/npm/npm/commit/113765bfb7d3801917c1d9f124b8b3d942bec89a) + `npm-registry-client@3.0.0` ([@othiym23](https://github.com/othiym23)) + +### v1.4.19 (2014-07-01): + +* [`f687433`](https://github.com/npm/npm/commit/f687433) relative URLS for + working non-root registry URLS ([@othiym23](https://github.com/othiym23)) +* [`bea190c`](https://github.com/npm/npm/commit/bea190c) + [#5591](https://github.com/npm/npm/issues/5591) bump nopt and npmconf + ([@isaacs](https://github.com/isaacs)) + +### v1.4.18 (2014-06-29): + +* Bump glob dependency from 4.0.2 to 4.0.3. It now uses graceful-fs when + available, increasing resilience to [various filesystem + errors](https://github.com/isaacs/node-graceful-fs#improvements-over-fs-module). + ([@isaacs](https://github.com/isaacs)) + +### v1.4.17 (2014-06-27): + +* replace escape codes with ansicolors + ([@othiym23](https://github.com/othiym23)) +* Allow to build all the docs OOTB. ([@GeJ](https://github.com/GeJ)) +* Use core.longpaths on win32 git - fixes + [#5525](https://github.com/npm/npm/issues/5525) (Bradley Meck) +* `npmconf@1.1.2` ([@isaacs](https://github.com/isaacs)) +* Consolidate color sniffing in config/log loading process + ([@isaacs](https://github.com/isaacs)) +* add verbose log when project config file is ignored + ([@isaacs](https://github.com/isaacs)) +* npmconf: Float patch to remove 'scope' from config defs + ([@isaacs](https://github.com/isaacs)) +* doc: npm-explore can't handle a version + ([@robertkowalski](https://github.com/robertkowalski)) +* Add user-friendly errors for ENOSPC and EROFS. + ([@voodootikigod](https://github.com/voodootikigod)) +* bump tar and fstream deps ([@isaacs](https://github.com/isaacs)) +* Run the npm-registry-couchapp tests along with npm tests + ([@isaacs](https://github.com/isaacs)) + +### v1.2.8000 (2014-06-17): + +* Same as v1.4.16, but with the spinner disabled, and a version number that + starts with v1.2. + +### v1.4.16 (2014-06-17): + +* `npm-registry-client@2.0.2` ([@isaacs](https://github.com/isaacs)) +* `fstream@0.1.27` ([@isaacs](https://github.com/isaacs)) +* `sha@1.2.4` ([@isaacs](https://github.com/isaacs)) +* `rimraf@2.2.8` ([@isaacs](https://github.com/isaacs)) +* `npmlog@1.0.1` ([@isaacs](https://github.com/isaacs)) +* `npm-registry-client@2.0.1` ([@isaacs](https://github.com/isaacs)) +* removed redundant dependency ([@othiym23](https://github.com/othiym23)) +* `npmconf@1.0.5` ([@isaacs](https://github.com/isaacs)) +* Properly handle errors that can occur in the config-loading process + ([@isaacs](https://github.com/isaacs)) + +### v1.4.15 (2014-06-10): + +* cache: atomic de-race-ified package.json writing + ([@isaacs](https://github.com/isaacs)) +* `fstream@0.1.26` ([@isaacs](https://github.com/isaacs)) +* `graceful-fs@3.0.2` ([@isaacs](https://github.com/isaacs)) +* `osenv@0.1.0` ([@isaacs](https://github.com/isaacs)) +* Only spin the spinner when we're fetching stuff + ([@isaacs](https://github.com/isaacs)) +* Update `osenv@0.1.0` which removes ~/tmp as possible tmp-folder + ([@robertkowalski](https://github.com/robertkowalski)) +* `ini@1.2.1` ([@isaacs](https://github.com/isaacs)) +* `graceful-fs@3` ([@isaacs](https://github.com/isaacs)) +* Update glob and things depending on glob + ([@isaacs](https://github.com/isaacs)) +* github-url-from-username-repo and read-package-json updates + ([@isaacs](https://github.com/isaacs)) +* `editor@0.1.0` ([@isaacs](https://github.com/isaacs)) +* `columnify@1.1.0` ([@isaacs](https://github.com/isaacs)) +* bump ansi and associated deps ([@isaacs](https://github.com/isaacs)) + +### v1.4.14 (2014-06-05): + +* char-spinner: update to not bork windows + ([@isaacs](https://github.com/isaacs)) + +### v1.4.13 (2014-05-23): + +* Fix `npm install` on a tarball. + ([`ed3abf1`](https://github.com/npm/npm/commit/ed3abf1aa10000f0f687330e976d78d1955557f6), + [#5330](https://github.com/npm/npm/issues/5330), + [@othiym23](https://github.com/othiym23)) +* Fix an issue with the spinner on Node 0.8. + ([`9f00306`](https://github.com/npm/npm/commit/9f003067909440390198c0b8f92560d84da37762), + [@isaacs](https://github.com/isaacs)) +* Re-add `npm.commands.cache.clean` and `npm.commands.cache.read` APIs, and + document `npm.commands.cache.*` as npm-cache(3). + ([`e06799e`](https://github.com/npm/npm/commit/e06799e77e60c1fc51869619083a25e074d368b3), + [@isaacs](https://github.com/isaacs)) + +### v1.4.12 (2014-05-23): + +* remove normalize-package-data from top level, de-^-ify inflight dep + ([@isaacs](https://github.com/isaacs)) +* Always sort saved bundleDependencies ([@isaacs](https://github.com/isaacs)) +* add inflight to bundledDependencies + ([@othiym23](https://github.com/othiym23)) + +### v1.4.11 (2014-05-22): + +* fix `npm ls` labeling issue +* `node-gyp@0.13.1` +* default repository to https:// instead of git:// +* addLocalTarball: Remove extraneous unpack + ([@isaacs](https://github.com/isaacs)) +* Massive cache folder refactor ([@othiym23](https://github.com/othiym23) and + [@isaacs](https://github.com/isaacs)) +* Busy Spinner, no http noise ([@isaacs](https://github.com/isaacs)) +* Per-project .npmrc file support ([@isaacs](https://github.com/isaacs)) +* `npmconf@1.0.0`, Refactor config/uid/prefix loading process + ([@isaacs](https://github.com/isaacs)) +* Allow once-disallowed characters in passwords + ([@isaacs](https://github.com/isaacs)) +* Send npm version as 'version' header ([@isaacs](https://github.com/isaacs)) +* fix cygwin encoding issue (Karsten Tinnefeld) +* Allow non-github repositories with `npm repo` + ([@evanlucas](https://github.com/evanlucas)) +* Allow peer deps to be satisfied by grandparent +* Stop optional deps moving into deps on `update --save` + ([@timoxley](https://github.com/timoxley)) +* Ensure only matching deps update with `update --save*` + ([@timoxley](https://github.com/timoxley)) +* Add support for `prerelease`, `preminor`, `prepatch` to `npm version` + +### v1.4.10 (2014-05-05): + +* Don't set referer if already set +* fetch: Send referer and npm-session headers +* `run-script`: Support `--parseable` and `--json` +* list runnable scripts ([@evanlucas](https://github.com/evanlucas)) +* Use marked instead of ronn for html docs + +### v1.4.9 (2014-05-01): + +* Send referer header (with any potentially private stuff redacted) +* Fix critical typo bug in previous npm release + +### v1.4.8 (2014-05-01): + +* Check SHA before using files from cache +* adduser: allow change of the saved password +* Make `npm install` respect `config.unicode` +* Fix lifecycle to pass `Infinity` for config env value +* Don't return 0 exit code on invalid command +* cache: Handle 404s and other HTTP errors as errors +* Resolve ~ in path configs to env.HOME +* Include npm version in default user-agent conf +* npm init: Use ISC as default license, use save-prefix for deps +* Many test and doc fixes + +### v1.4.7 (2014-04-15): + +* Add `--save-prefix` option that can be used to override the default of `^` + when using `npm install --save` and its counterparts. + ([`64eefdf`](https://github.com/npm/npm/commit/64eefdfe26bb27db8dc90e3ab5d27a5ef18a4470), + [@thlorenz](https://github.com/thlorenz)) +* Allow `--silent` to silence the echoing of commands that occurs with `npm + run`. + ([`c95cf08`](https://github.com/npm/npm/commit/c95cf086e5b97dbb48ff95a72517b203a8f29eab), + [@Raynos](https://github.com/Raynos)) +* Some speed improvements to the cache, which should improve install times. + ([`cb94310`](https://github.com/npm/npm/commit/cb94310a6adb18cb7b881eacb8d67171eda8b744), + [`3b0870f`](https://github.com/npm/npm/commit/3b0870fb2f40358b3051abdab6be4319d196b99d), + [`120f5a9`](https://github.com/npm/npm/commit/120f5a93437bbbea9249801574a2f33e44e81c33), + [@isaacs](https://github.com/isaacs)) +* Improve ability to retry registry requests when a subset of the registry + servers are down. + ([`4a5257d`](https://github.com/npm/npm/commit/4a5257de3870ac3dafa39667379f19f6dcd6093e), + https://github.com/npm/npm-registry-client/commit/7686d02cb0b844626d6a401e58c0755ef3bc8432, + [@isaacs](https://github.com/isaacs)) +* Fix marking of peer dependencies as extraneous. + ([`779b164`](https://github.com/npm/npm/commit/779b1649764607b062c031c7e5c972151b4a1754), + https://github.com/npm/read-installed/commit/6680ba6ef235b1ca3273a00b70869798ad662ddc, + [@isaacs](https://github.com/isaacs)) +* Fix npm crashing when doing `npm shrinkwrap` in the presence of a + `package.json` with no dependencies. + ([`a9d9fa5`](https://github.com/npm/npm/commit/a9d9fa5ad3b8c925a589422b7be28d2735f320b0), + [@kislyuk](https://github.com/kislyuk)) +* Fix error when using `npm view` on packages that have no versions or have + been unpublished. + ([`94df2f5`](https://github.com/npm/npm/commit/94df2f56d684b35d1df043660180fc321b743dc8), + [@juliangruber](https://github.com/juliangruber); + [`2241a09`](https://github.com/npm/npm/commit/2241a09c843669c70633c399ce698cec3add40b3), + [@isaacs](https://github.com/isaacs)) + +### v1.4.6 (2014-03-19): + +* Fix extraneous package detection to work in more cases. + ([`f671286`](https://github.com/npm/npm/commit/f671286), npm/read-installed#20, + [@LaurentVB](https://github.com/LaurentVB)) + +### v1.4.5 (2014-03-18): + +* Sort dependencies in `package.json` when doing `npm install --save` and all + its variants. + ([`6fd6ff7`](https://github.com/npm/npm/commit/6fd6ff7e536ea6acd33037b1878d4eca1f931985), + [@domenic](https://github.com/domenic)) +* Add `--save-exact` option, usable alongside `--save` and its variants, which + will write the exact version number into `package.json` instead of the + appropriate semver-compatibility range. + ([`17f07df`](https://github.com/npm/npm/commit/17f07df8ad8e594304c2445bf7489cb53346f2c5), + [@timoxley](https://github.com/timoxley)) +* Accept gzipped content from the registry to speed up downloads and save + bandwidth. + ([`a3762de`](https://github.com/npm/npm/commit/a3762de843b842be8fa0ab57cdcd6b164f145942), + npm/npm-registry-client#40, [@fengmk2](https://github.com/fengmk2)) +* Fix `npm ls`'s `--depth` and `--log` options. + ([`1d29b17`](https://github.com/npm/npm/commit/1d29b17f5193d52a5c4faa412a95313dcf41ed91), + npm/read-installed#13, [@zertosh](https://github.com/zertosh)) +* Fix "Adding a cache directory to the cache will make the world implode" in + certain cases. + ([`9a4b2c4`](https://github.com/npm/npm/commit/9a4b2c4667c2b1e0054e3d5611ab86acb1760834), + domenic/path-is-inside#1, [@pmarques](https://github.com/pmarques)) +* Fix readmes not being uploaded in certain rare cases. + ([`527b72c`](https://github.com/npm/npm/commit/527b72cca6c55762b51e592c48a9f28cc7e2ff8b), + [@isaacs](https://github.com/isaacs)) + +### v1.4.4 (2014-02-20): + +* Add `npm t` as an alias for `npm test` (which is itself an alias for `npm run + test`, or even `npm run-script test`). We like making running your tests + easy. ([`14e650b`](https://github.com/npm/npm/commit/14e650bce0bfebba10094c961ac104a61417a5de), [@isaacs](https://github.com/isaacs)) + +### v1.4.3 (2014-02-16): + +* Add back `npm prune --production`, which was removed in 1.3.24. + ([`acc4d02`](https://github.com/npm/npm/commit/acc4d023c57d07704b20a0955e4bf10ee91bdc83), + [@davglass](https://github.com/davglass)) +* Default `npm install --save` and its counterparts to use the `^` version + specifier, instead of `~`. + ([`0a3151c`](https://github.com/npm/npm/commit/0a3151c9cbeb50c1c65895685c2eabdc7e2608dc), + [@mikolalysenko](https://github.com/mikolalysenko)) +* Make `npm shrinkwrap` output dependencies in a sorted order, so that diffs + between shrinkwrap files should be saner now. + ([`059b2bf`](https://github.com/npm/npm/commit/059b2bfd06ae775205a37257dca80142596a0113), + [@Raynos](https://github.com/Raynos)) +* Fix `npm dedupe` not correctly respecting dependency constraints. + ([`86028e9`](https://github.com/npm/npm/commit/86028e9fd8524d5e520ce01ba2ebab5a030103fc), + [@rafeca](https://github.com/rafeca)) +* Fix `npm ls` giving spurious warnings when you used `"latest"` as a version + specifier. + (https://github.com/npm/read-installed/commit/d2956400e0386931c926e0f30c334840e0938f14, + [@bajtos](https://github.com/bajtos)) +* Fixed a bug where using `npm link` on packages without a `name` value could + cause npm to delete itself. + ([`401a642`](https://github.com/npm/npm/commit/401a64286aa6665a94d1d2f13604f7014c5fce87), + [@isaacs](https://github.com/isaacs)) +* Fixed `npm install ./pkg@1.2.3` to actually install the directory at + `pkg@1.2.3`; before it would try to find version `1.2.3` of the package + `./pkg` in the npm registry. + ([`46d8768`](https://github.com/npm/npm/commit/46d876821d1dd94c050d5ebc86444bed12c56739), + [@rlidwka](https://github.com/rlidwka); see also + [`f851b79`](https://github.com/npm/npm/commit/f851b79a71d9a5f5125aa85877c94faaf91bea5f)) +* Fix `npm outdated` to respect the `color` configuration option. + ([`d4f6f3f`](https://github.com/npm/npm/commit/d4f6f3ff83bd14fb60d3ac6392cb8eb6b1c55ce1), + [@timoxley](https://github.com/timoxley)) +* Fix `npm outdated --parseable`. + ([`9575a23`](https://github.com/npm/npm/commit/9575a23f955ce3e75b509c89504ef0bd707c8cf6), + [@yhpark](https://github.com/yhpark)) +* Fix a lockfile-related errors when using certain Git URLs. + ([`164b97e`](https://github.com/npm/npm/commit/164b97e6089f64e686db7a9a24016f245effc37f), + [@nigelzor](https://github.com/nigelzor)) + +### v1.4.2 (2014-02-13): + +* Fixed an issue related to mid-publish GET requests made against the registry. + (https://github.com/npm/npm-registry-client/commit/acbec48372bc1816c67c9e7cbf814cf50437ff93, + [@isaacs](https://github.com/isaacs)) + +### v1.4.1 (2014-02-13): + +* Fix `npm shrinkwrap` forgetting to shrinkwrap dependencies that were also + development dependencies. + ([`9c575c5`](https://github.com/npm/npm/commit/9c575c56efa9b0c8b0d4a17cb9c1de3833004bcd), + [@diwu1989](https://github.com/diwu1989)) +* Fixed publishing of pre-existing packages with uppercase characters in their + name. + (https://github.com/npm/npm-registry-client/commit/9345d3b6c3d8510dd5c4418f27ee1fce59acebad, + [@isaacs](https://github.com/isaacs)) + +### v1.4.0 (2014-02-12): + +* Remove `npm publish --force`. See + https://github.com/npm/npmjs.org/issues/148. + ([@isaacs](https://github.com/isaacs), + npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) +* Other changes to the registry client related to saved configs and couch + logins. ([@isaacs](https://github.com/isaacs); + npm/npm-registry-client@25e2b019a1588155e5f87d035c27e79963b75951, + npm/npm-registry-client@9e41e9101b68036e0f078398785f618575f3cdde, + npm/npm-registry-client@2c8dba990de6a59af6545b75cc00a6dc12777c2a) +* Show an error to the user when doing `npm update` and the `package.json` + specifies a version that does not exist. + ([@evanlucas](https://github.com/evanlucas), + [`027a33a`](https://github.com/npm/npm/commit/027a33a5c594124cc1d82ddec5aee2c18bc8dc32)) +* Fix some issues with cache ownership in certain installation configurations. + ([@outcoldman](https://github.com/outcoldman), + [`a132690`](https://github.com/npm/npm/commit/a132690a2876cda5dcd1e4ca751f21dfcb11cb9e)) +* Fix issues where GitHub shorthand dependencies `user/repo` were not always + treated the same as full Git URLs. + ([@robertkowalski](https://github.com/robertkowalski), + https://github.com/meryn/normalize-package-data/commit/005d0b637aec1895117fcb4e3b49185eebf9e240) + +### v1.3.26 (2014-02-02): + +* Fixes and updates to publishing code + ([`735427a`](https://github.com/npm/npm/commit/735427a69ba4fe92aafa2d88f202aaa42920a9e2) + and + [`c0ac832`](https://github.com/npm/npm/commit/c0ac83224d49aa62e55577f8f27d53bbfd640dc5), + [@isaacs](https://github.com/isaacs)) +* Fix `npm bugs` with no arguments. + ([`b99d465`](https://github.com/npm/npm/commit/b99d465221ac03bca30976cbf4d62ca80ab34091), + [@Hoops](https://github.com/Hoops)) + +### v1.3.25 (2014-01-25): + +* Remove gubblebum blocky font from documentation headers. + ([`6940c9a`](https://github.com/npm/npm/commit/6940c9a100160056dc6be8f54a7ad7fa8ceda7e2), + [@isaacs](https://github.com/isaacs)) + +### v1.3.24 (2014-01-19): + +* Make the search output prettier, with nice truncated columns, and a `--long` + option to create wrapping columns. + ([`20439b2`](https://github.com/npm/npm/commit/20439b2) and + [`3a6942d`](https://github.com/npm/npm/commit/3a6942d), + [@timoxley](https://github.com/timoxley)) +* Support multiple packagenames in `npm docs`. + ([`823010b`](https://github.com/npm/npm/commit/823010b), + [@timoxley](https://github.com/timoxley)) +* Fix the `npm adduser` bug regarding "Error: default value must be string or + number" again. ([`b9b4248`](https://github.com/npm/npm/commit/b9b4248), + [@isaacs](https://github.com/isaacs)) +* Fix `scripts` entries containing whitespaces on Windows. + ([`80282ed`](https://github.com/npm/npm/commit/80282ed), + [@robertkowalski](https://github.com/robertkowalski)) +* Fix `npm update` for Git URLs that have credentials in them + ([`93fc364`](https://github.com/npm/npm/commit/93fc364), + [@danielsantiago](https://github.com/danielsantiago)) +* Fix `npm install` overwriting `npm link`-ed dependencies when they are tagged + Git dependencies. ([`af9bbd9`](https://github.com/npm/npm/commit/af9bbd9), + [@evanlucas](https://github.com/evanlucas)) +* Remove `npm prune --production` since it buggily removed some dependencies + that were necessary for production; see + [#4509](https://github.com/npm/npm/issues/4509). Hopefully it can make its + triumphant return, one day. + ([`1101b6a`](https://github.com/npm/npm/commit/1101b6a), + [@isaacs](https://github.com/isaacs)) + +Dependency updates: +* [`909cccf`](https://github.com/npm/npm/commit/909cccf) `read-package-json@1.1.6` +* [`a3891b6`](https://github.com/npm/npm/commit/a3891b6) `rimraf@2.2.6` +* [`ac6efbc`](https://github.com/npm/npm/commit/ac6efbc) `sha@1.2.3` +* [`dd30038`](https://github.com/npm/npm/commit/dd30038) `node-gyp@0.12.2` +* [`c8c3ebe`](https://github.com/npm/npm/commit/c8c3ebe) `npm-registry-client@0.3.3` +* [`4315286`](https://github.com/npm/npm/commit/4315286) `npmconf@0.1.12` + +### v1.3.23 (2014-01-03): + +* Properly handle installations that contained a certain class of circular + dependencies. + ([`5dc93e8`](https://github.com/npm/npm/commit/5dc93e8c82604c45b6067b1acf1c768e0bfce754), + [@substack](https://github.com/substack)) + +### v1.3.22 (2013-12-25): + +* Fix a critical bug in `npm adduser` that would manifest in the error message + "Error: default value must be string or number." + ([`fba4bd2`](https://github.com/npm/npm/commit/fba4bd24bc2ab00ccfeda2043aa53af7d75ef7ce), + [@isaacs](https://github.com/isaacs)) +* Allow `npm bugs` in the current directory to open the current package's bugs + URL. + ([`d04cf64`](https://github.com/npm/npm/commit/d04cf6483932c693452f3f778c2fa90f6153a4af), + [@evanlucas](https://github.com/evanlucas)) +* Several fixes to various error messages to include more useful or updated + information. + ([`1e6f2a7`](https://github.com/npm/npm/commit/1e6f2a72ca058335f9f5e7ca22d01e1a8bb0f9f7), + [`ff46366`](https://github.com/npm/npm/commit/ff46366bd40ff0ef33c7bac8400bc912c56201d1), + [`8b4bb48`](https://github.com/npm/npm/commit/8b4bb4815d80a3612186dc5549d698e7b988eb03); + [@rlidwka](https://github.com/rlidwka), + [@evanlucas](https://github.com/evanlucas)) + +### v1.3.21 (2013-12-17): + +* Fix a critical bug that prevented publishing due to incorrect hash + calculation. + ([`4ca4a2c`](https://github.com/npm/npm-registry-client/commit/4ca4a2c6333144299428be6b572e2691aa59852e), + [@dominictarr](https://github.com/dominictarr)) + +### v1.3.20 (2013-12-17): + +* Fixes a critical bug in v1.3.19. Thankfully, due to that bug, no one could + install npm v1.3.19 :) + +### v1.3.19 (2013-12-16): + +* Adds atomic PUTs for publishing packages, which should result in far fewer + requests and less room for replication errors on the server-side. + +### v1.3.18 (2013-12-16): + +* Added an `--ignore-scripts` option, which will prevent `package.json` scripts + from being run. Most notably, this will work on `npm install`, so e.g. `npm + install --ignore-scripts` will not run preinstall and prepublish scripts. + ([`d7e67bf`](https://github.com/npm/npm/commit/d7e67bf0d94b085652ec1c87d595afa6f650a8f6), + [@sqs](https://github.com/sqs)) +* Fixed a bug introduced in 1.3.16 that would manifest with certain cache + configurations, by causing spurious errors saying "Adding a cache directory + to the cache will make the world implode." + ([`966373f`](https://github.com/npm/npm/commit/966373fad8d741637f9744882bde9f6e94000865), + [@domenic](https://github.com/domenic)) +* Re-fixed the multiple download of URL dependencies, whose fix was reverted in + 1.3.17. + ([`a362c3f`](https://github.com/npm/npm/commit/a362c3f1919987419ed8a37c8defa19d2e6697b0), + [@spmason](https://github.com/spmason)) + +### v1.3.17 (2013-12-11): + +* This release reverts + [`644c2ff`](https://github.com/npm/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), + which avoided re-downloading URL and shinkwrap dependencies when doing `npm + install`. You can see the in-depth reasoning in + [`d8c907e`](https://github.com/npm/npm/commit/d8c907edc2019b75cff0f53467e34e0ffd7e5fba); + the problem was, that the patch changed the behavior of `npm install -f` to + reinstall all dependencies. +* A new version of the no-re-downloading fix has been submitted as + [#4303](https://github.com/npm/npm/issues/4303) and will hopefully be + included in the next release. + +### v1.3.16 (2013-12-11): + +* Git URL dependencies are now updated on `npm install`, fixing a two-year old + bug + ([`5829ecf`](https://github.com/npm/npm/commit/5829ecf032b392d2133bd351f53d3c644961396b), + [@robertkowalski](https://github.com/robertkowalski)). Additional progress on + reducing the resulting Git-related I/O is tracked as + [#4191](https://github.com/npm/npm/issues/4191), but for now, this will be a + big improvement. +* Added a `--json` mode to `npm outdated` to give a parseable output. + ([`0b6c9b7`](https://github.com/npm/npm/commit/0b6c9b7c8c5579f4d7d37a0c24d9b7a12ccbe5fe), + [@yyx990803](https://github.com/yyx990803)) +* Made `npm outdated` much prettier and more useful. It now outputs a + color-coded and easy-to-read table. + ([`fd3017f`](https://github.com/npm/npm/commit/fd3017fc3e9d42acf6394a5285122edb4dc16106), + [@quimcalpe](https://github.com/quimcalpe)) +* Added the `--depth` option to `npm outdated`, so that e.g. you can do `npm + outdated --depth=0` to show only top-level outdated dependencies. + ([`1d184ef`](https://github.com/npm/npm/commit/1d184ef3f4b4bc309d38e9128732e3e6fb46d49c), + [@yyx990803](https://github.com/yyx990803)) +* Added a `--no-git-tag-version` option to `npm version`, for doing the usual + job of `npm version` minus the Git tagging. This could be useful if you need + to increase the version in other related files before actually adding the + tag. + ([`59ca984`](https://github.com/npm/npm/commit/59ca9841ba4f4b2f11b8e72533f385c77ae9f8bd), + [@evanlucas](https://github.com/evanlucas)) +* Made `npm repo` and `npm docs` work without any arguments, adding them to the + list of npm commands that work on the package in the current directory when + invoked without arguments. + ([`bf9048e`](https://github.com/npm/npm/commit/bf9048e2fa16d43fbc4b328d162b0a194ca484e8), + [@robertkowalski](https://github.com/robertkowalski); + [`07600d0`](https://github.com/npm/npm/commit/07600d006c652507cb04ac0dae9780e35073dd67), + [@wilmoore](https://github.com/wilmoore)). There are a few other commands we + still want to implement this for; see + [#4204](https://github.com/npm/npm/issues/4204). +* Pass through the `GIT_SSL_NO_VERIFY` environment variable to Git, if it is + set; we currently do this with a few other environment variables, but we + missed that one. + ([`c625de9`](https://github.com/npm/npm/commit/c625de91770df24c189c77d2e4bc821f2265efa8), + [@arikon](https://github.com/arikon)) +* Fixed `npm dedupe` on Windows due to incorrect path separators being used + ([`7677de4`](https://github.com/npm/npm/commit/7677de4583100bc39407093ecc6bc13715bf8161), + [@mcolyer](https://github.com/mcolyer)). +* Fixed the `npm help` command when multiple words were searched for; it + previously gave a `ReferenceError`. + ([`6a28dd1`](https://github.com/npm/npm/commit/6a28dd147c6957a93db12b1081c6e0da44fe5e3c), + [@dereckson](https://github.com/dereckson)) +* Stopped re-downloading URL and shrinkwrap dependencies, as demonstrated in + [#3463](https://github.com/npm/npm/issues/3463) + ([`644c2ff`](https://github.com/isaacs/npm/commit/644c2ff3e3d9c93764f7045762477f48864d64a7), + [@spmason](https://github.com/spmason)). You can use the `--force` option to + force re-download and installation of all dependencies. diff --git a/deps/npm/Makefile b/deps/npm/Makefile index 78014d5c7e..540e2da05b 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -1,6 +1,9 @@ # vim: set softtabstop=2 shiftwidth=2: SHELL = bash +PUBLISHTAG = $(shell node scripts/publish-tag.js) +BRANCH = $(shell git rev-parse --abbrev-ref HEAD) + markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md html_docdeps = html/dochead.html \ @@ -170,44 +173,15 @@ man: $(cli_docs) $(api_docs) test: doc node cli.js test +tag: + npm tag npm@$(PUBLISHTAG) latest + publish: link doc @git push origin :v$(shell npm -v) 2>&1 || true - @npm unpublish npm@$(shell npm -v) 2>&1 || true git clean -fd &&\ - git push origin &&\ + git push origin $(BRANCH) &&\ git push origin --tags &&\ - npm publish &&\ - make doc-publish - -docpublish: doc-publish -doc-publish: doc - # legacy urls - for f in $$(find html/doc/{cli,files,misc}/ -name '*.html'); do \ - j=$$(basename $$f | sed 's|^npm-||g'); \ - if ! [ -f html/doc/$$j ] && [ $$j != README.html ] && [ $$j != index.html ]; then \ - perl -pi -e 's/ href="\.\.\// href="/g' <$$f >html/doc/$$j; \ - fi; \ - done - mkdir -p html/api - for f in $$(find html/doc/api/ -name '*.html'); do \ - j=$$(basename $$f | sed 's|^npm-||g'); \ - perl -pi -e 's/ href="\.\.\// href="/g' <$$f >html/api/$$j; \ - done - rsync -vazu --stats --no-implied-dirs --delete \ - html/doc/* \ - ../npm-www/doc - rsync -vazu --stats --no-implied-dirs --delete \ - html/static/style.css \ - ../npm-www/static/ - #cleanup - rm -rf html/api - for f in html/doc/*.html; do \ - case $$f in \ - html/doc/README.html) continue ;; \ - html/doc/index.html) continue ;; \ - *) rm $$f ;; \ - esac; \ - done + npm publish --tag=$(PUBLISHTAG) release: @bash scripts/release.sh @@ -215,4 +189,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-publish doc-clean docclean docpublish release +.PHONY: all latest install dev link doc clean uninstall test man doc-clean docclean release diff --git a/deps/npm/doc/cli/npm-version.md b/deps/npm/doc/cli/npm-version.md index 870bd49215..b30b6a3a21 100644 --- a/deps/npm/doc/cli/npm-version.md +++ b/deps/npm/doc/cli/npm-version.md @@ -3,17 +3,17 @@ npm-version(1) -- Bump a package version ## SYNOPSIS - npm version [ | major | minor | patch] + npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease] ## DESCRIPTION Run this in a package directory to bump the version and write the new data back to the package.json file. -The `newversion` argument should be a valid semver string, *or* a valid -second argument to semver.inc (one of "patch", "minor", or -"major"). In the second case, the existing version will be incremented -by 1 in the specified field. +The `newversion` argument should be a valid semver string, *or* a +valid second argument to semver.inc (one of "patch", "minor", "major", +"prepatch", "preminor", "premajor", "prerelease"). In the second case, +the existing version will be incremented by 1 in the specified field. If run in a git repo, it will also create a version commit and tag, and fail if the repo is not clean. diff --git a/deps/npm/doc/misc/npm-index.md b/deps/npm/doc/misc/npm-index.md index ebfdc5a8af..4e9f70c99e 100644 --- a/deps/npm/doc/misc/npm-index.md +++ b/deps/npm/doc/misc/npm-index.md @@ -1,415 +1,423 @@ npm-index(7) -- Index of all npm documentation ============================================== -## README(1) +### README(1) node package manager -# Command Line Documentation +## Command Line Documentation -## npm(1) +Using npm on the command line + +### npm(1) node package manager -## npm-adduser(1) +### npm-adduser(1) Add a registry user account -## npm-bin(1) +### npm-bin(1) Display npm bin folder -## npm-bugs(1) +### npm-bugs(1) Bugs for a package in a web browser maybe -## npm-build(1) +### npm-build(1) Build a package -## npm-bundle(1) +### npm-bundle(1) REMOVED -## npm-cache(1) +### npm-cache(1) Manipulates packages cache -## npm-completion(1) +### npm-completion(1) Tab Completion for npm -## npm-config(1) +### npm-config(1) Manage the npm configuration files -## npm-dedupe(1) +### npm-dedupe(1) Reduce duplication -## npm-deprecate(1) +### npm-deprecate(1) Deprecate a version of a package -## npm-docs(1) +### npm-docs(1) Docs for a package in a web browser maybe -## npm-edit(1) +### npm-edit(1) Edit an installed package -## npm-explore(1) +### npm-explore(1) Browse an installed package -## npm-help-search(1) +### npm-help-search(1) Search npm help documentation -## npm-help(1) +### npm-help(1) Get help on npm -## npm-init(1) +### npm-init(1) Interactively create a package.json file -## npm-install(1) +### npm-install(1) Install a package -## npm-link(1) +### npm-link(1) Symlink a package folder -## npm-ls(1) +### npm-ls(1) List installed packages -## npm-outdated(1) +### npm-outdated(1) Check for outdated packages -## npm-owner(1) +### npm-owner(1) Manage package owners -## npm-pack(1) +### npm-pack(1) Create a tarball from a package -## npm-prefix(1) +### npm-prefix(1) Display prefix -## npm-prune(1) +### npm-prune(1) Remove extraneous packages -## npm-publish(1) +### npm-publish(1) Publish a package -## npm-rebuild(1) +### npm-rebuild(1) Rebuild a package -## npm-repo(1) +### npm-repo(1) Open package repository page in the browser -## npm-restart(1) +### npm-restart(1) Start a package -## npm-rm(1) +### npm-rm(1) Remove a package -## npm-root(1) +### npm-root(1) Display npm root -## npm-run-script(1) +### npm-run-script(1) Run arbitrary package scripts -## npm-search(1) +### npm-search(1) Search for packages -## npm-shrinkwrap(1) +### npm-shrinkwrap(1) Lock down dependency versions -## npm-star(1) +### npm-star(1) Mark your favorite packages -## npm-stars(1) +### npm-stars(1) View packages marked as favorites -## npm-start(1) +### npm-start(1) Start a package -## npm-stop(1) +### npm-stop(1) Stop a package -## npm-submodule(1) +### npm-submodule(1) Add a package as a git submodule -## npm-tag(1) +### npm-tag(1) Tag a published version -## npm-test(1) +### npm-test(1) Test a package -## npm-uninstall(1) +### npm-uninstall(1) Remove a package -## npm-unpublish(1) +### npm-unpublish(1) Remove a package from the registry -## npm-update(1) +### npm-update(1) Update a package -## npm-version(1) +### npm-version(1) Bump a package version -## npm-view(1) +### npm-view(1) View registry info -## npm-whoami(1) +### npm-whoami(1) Display npm username -# API Documentation +## API Documentation + +Using npm in your Node programs -## npm(3) +### npm(3) node package manager -## npm-bin(3) +### npm-bin(3) Display npm bin folder -## npm-bugs(3) +### npm-bugs(3) Bugs for a package in a web browser maybe -## npm-cache(3) +### npm-cache(3) manage the npm cache programmatically -## npm-commands(3) +### npm-commands(3) npm commands -## npm-config(3) +### npm-config(3) Manage the npm configuration files -## npm-deprecate(3) +### npm-deprecate(3) Deprecate a version of a package -## npm-docs(3) +### npm-docs(3) Docs for a package in a web browser maybe -## npm-edit(3) +### npm-edit(3) Edit an installed package -## npm-explore(3) +### npm-explore(3) Browse an installed package -## npm-help-search(3) +### npm-help-search(3) Search the help pages -## npm-init(3) +### npm-init(3) Interactively create a package.json file -## npm-install(3) +### npm-install(3) install a package programmatically -## npm-link(3) +### npm-link(3) Symlink a package folder -## npm-load(3) +### npm-load(3) Load config settings -## npm-ls(3) +### npm-ls(3) List installed packages -## npm-outdated(3) +### npm-outdated(3) Check for outdated packages -## npm-owner(3) +### npm-owner(3) Manage package owners -## npm-pack(3) +### npm-pack(3) Create a tarball from a package -## npm-prefix(3) +### npm-prefix(3) Display prefix -## npm-prune(3) +### npm-prune(3) Remove extraneous packages -## npm-publish(3) +### npm-publish(3) Publish a package -## npm-rebuild(3) +### npm-rebuild(3) Rebuild a package -## npm-repo(3) +### npm-repo(3) Open package repository page in the browser -## npm-restart(3) +### npm-restart(3) Start a package -## npm-root(3) +### npm-root(3) Display npm root -## npm-run-script(3) +### npm-run-script(3) Run arbitrary package scripts -## npm-search(3) +### npm-search(3) Search for packages -## npm-shrinkwrap(3) +### npm-shrinkwrap(3) programmatically generate package shrinkwrap file -## npm-start(3) +### npm-start(3) Start a package -## npm-stop(3) +### npm-stop(3) Stop a package -## npm-submodule(3) +### npm-submodule(3) Add a package as a git submodule -## npm-tag(3) +### npm-tag(3) Tag a published version -## npm-test(3) +### npm-test(3) Test a package -## npm-uninstall(3) +### npm-uninstall(3) uninstall a package programmatically -## npm-unpublish(3) +### npm-unpublish(3) Remove a package from the registry -## npm-update(3) +### npm-update(3) Update a package -## npm-version(3) +### npm-version(3) Bump a package version -## npm-view(3) +### npm-view(3) View registry info -## npm-whoami(3) +### npm-whoami(3) Display npm username -# Files +## Files -## npm-folders(5) +File system structures npm uses + +### npm-folders(5) Folder Structures Used by npm -## npmrc(5) +### npmrc(5) The npm config files -## package.json(5) +### package.json(5) Specifics of npm's package.json handling -# Misc +## Misc + +Various other bits and bobs -## npm-coding-style(7) +### npm-coding-style(7) npm's "funny" coding style -## npm-config(7) +### npm-config(7) More than you probably want to know about npm configuration -## npm-developers(7) +### npm-developers(7) Developer Guide -## npm-disputes(7) +### npm-disputes(7) Handling Module Name Disputes -## npm-faq(7) +### npm-faq(7) Frequently Asked Questions -## npm-index(7) +### npm-index(7) Index of all npm documentation -## npm-registry(7) +### npm-registry(7) The JavaScript Package Registry -## npm-scripts(7) +### npm-scripts(7) How npm handles the "scripts" field -## removing-npm(7) +### removing-npm(7) Cleaning the Slate -## semver(7) +### semver(7) The semantic versioner for npm diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 879c62f94f..6a4832313b 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -141,7 +141,7 @@ specific purpose, or lack of malice in any given npm package.

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.

@@ -161,7 +161,7 @@ ban your account in extreme cases. So don't do that.

  • web: https://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.

    @@ -186,5 +186,5 @@ will no doubt tell you to put the output in a gist or email.

           - + diff --git a/deps/npm/html/doc/api/npm-bin.html b/deps/npm/html/doc/api/npm-bin.html index 0dc0e6a581..3a170b0244 100644 --- a/deps/npm/html/doc/api/npm-bin.html +++ b/deps/npm/html/doc/api/npm-bin.html @@ -28,5 +28,5 @@ to the npm.bin member.

           - + diff --git a/deps/npm/html/doc/api/npm-bugs.html b/deps/npm/html/doc/api/npm-bugs.html index c7a5698790..1ab1393fff 100644 --- a/deps/npm/html/doc/api/npm-bugs.html +++ b/deps/npm/html/doc/api/npm-bugs.html @@ -33,5 +33,5 @@ friendly for programmatic use.

           - + diff --git a/deps/npm/html/doc/api/npm-cache.html b/deps/npm/html/doc/api/npm-cache.html index b87ccaa98e..ed67808303 100644 --- a/deps/npm/html/doc/api/npm-cache.html +++ b/deps/npm/html/doc/api/npm-cache.html @@ -42,5 +42,5 @@ incrementation.

           - + diff --git a/deps/npm/html/doc/api/npm-commands.html b/deps/npm/html/doc/api/npm-commands.html index b1bd719765..9ab89fb5cd 100644 --- a/deps/npm/html/doc/api/npm-commands.html +++ b/deps/npm/html/doc/api/npm-commands.html @@ -36,5 +36,5 @@ usage, or man 3 npm-<command> for programmatic usage.

           - + diff --git a/deps/npm/html/doc/api/npm-config.html b/deps/npm/html/doc/api/npm-config.html index b1875ff199..2fe37f217c 100644 --- a/deps/npm/html/doc/api/npm-config.html +++ b/deps/npm/html/doc/api/npm-config.html @@ -57,5 +57,5 @@ functions instead.

           - + diff --git a/deps/npm/html/doc/api/npm-deprecate.html b/deps/npm/html/doc/api/npm-deprecate.html index ac78d738f6..557d2efe3c 100644 --- a/deps/npm/html/doc/api/npm-deprecate.html +++ b/deps/npm/html/doc/api/npm-deprecate.html @@ -47,5 +47,5 @@ a deprecation warning to all who attempt to install it.

           - + diff --git a/deps/npm/html/doc/api/npm-docs.html b/deps/npm/html/doc/api/npm-docs.html index b1b3eb280f..d42b27b037 100644 --- a/deps/npm/html/doc/api/npm-docs.html +++ b/deps/npm/html/doc/api/npm-docs.html @@ -33,5 +33,5 @@ friendly for programmatic use.

           - + diff --git a/deps/npm/html/doc/api/npm-edit.html b/deps/npm/html/doc/api/npm-edit.html index 30e208e724..f6f4617e12 100644 --- a/deps/npm/html/doc/api/npm-edit.html +++ b/deps/npm/html/doc/api/npm-edit.html @@ -36,5 +36,5 @@ and how this is used.

           - + diff --git a/deps/npm/html/doc/api/npm-explore.html b/deps/npm/html/doc/api/npm-explore.html index 2de8c2a392..0136e705a2 100644 --- a/deps/npm/html/doc/api/npm-explore.html +++ b/deps/npm/html/doc/api/npm-explore.html @@ -31,5 +31,5 @@ sure to use npm rebuild <pkg> if you make any changes.

           - + diff --git a/deps/npm/html/doc/api/npm-help-search.html b/deps/npm/html/doc/api/npm-help-search.html index e3e8d31f2d..e2bb08abbd 100644 --- a/deps/npm/html/doc/api/npm-help-search.html +++ b/deps/npm/html/doc/api/npm-help-search.html @@ -44,5 +44,5 @@ Name of the file that matched        - + diff --git a/deps/npm/html/doc/api/npm-init.html b/deps/npm/html/doc/api/npm-init.html index fd88483e07..ca23df8f48 100644 --- a/deps/npm/html/doc/api/npm-init.html +++ b/deps/npm/html/doc/api/npm-init.html @@ -39,5 +39,5 @@ then go ahead and use this programmatically.

           - + diff --git a/deps/npm/html/doc/api/npm-install.html b/deps/npm/html/doc/api/npm-install.html index b22e4374a4..c0e0eb78bf 100644 --- a/deps/npm/html/doc/api/npm-install.html +++ b/deps/npm/html/doc/api/npm-install.html @@ -32,5 +32,5 @@ installed or when an error has been encountered.

           - + diff --git a/deps/npm/html/doc/api/npm-link.html b/deps/npm/html/doc/api/npm-link.html index 0353709f7e..aff1250a4c 100644 --- a/deps/npm/html/doc/api/npm-link.html +++ b/deps/npm/html/doc/api/npm-link.html @@ -42,5 +42,5 @@ the package in the current working directory

           - + diff --git a/deps/npm/html/doc/api/npm-load.html b/deps/npm/html/doc/api/npm-load.html index 826e2f869a..7451a75728 100644 --- a/deps/npm/html/doc/api/npm-load.html +++ b/deps/npm/html/doc/api/npm-load.html @@ -37,5 +37,5 @@ config object.

           - + diff --git a/deps/npm/html/doc/api/npm-ls.html b/deps/npm/html/doc/api/npm-ls.html index 65a93e24f1..f1c2504918 100644 --- a/deps/npm/html/doc/api/npm-ls.html +++ b/deps/npm/html/doc/api/npm-ls.html @@ -63,5 +63,5 @@ dependency will only be output once.

           - + diff --git a/deps/npm/html/doc/api/npm-outdated.html b/deps/npm/html/doc/api/npm-outdated.html index 4adcee8490..a7e88b882c 100644 --- a/deps/npm/html/doc/api/npm-outdated.html +++ b/deps/npm/html/doc/api/npm-outdated.html @@ -28,5 +28,5 @@ currently outdated.

           - + diff --git a/deps/npm/html/doc/api/npm-owner.html b/deps/npm/html/doc/api/npm-owner.html index fef0cd23de..eb8f9abafa 100644 --- a/deps/npm/html/doc/api/npm-owner.html +++ b/deps/npm/html/doc/api/npm-owner.html @@ -47,5 +47,5 @@ that is not implemented at this time.

           - + diff --git a/deps/npm/html/doc/api/npm-pack.html b/deps/npm/html/doc/api/npm-pack.html index 7db7d493e7..c2476f20e0 100644 --- a/deps/npm/html/doc/api/npm-pack.html +++ b/deps/npm/html/doc/api/npm-pack.html @@ -33,5 +33,5 @@ overwritten the second time.

           - + diff --git a/deps/npm/html/doc/api/npm-prefix.html b/deps/npm/html/doc/api/npm-prefix.html index 7c75add74d..583079e336 100644 --- a/deps/npm/html/doc/api/npm-prefix.html +++ b/deps/npm/html/doc/api/npm-prefix.html @@ -29,5 +29,5 @@        - + diff --git a/deps/npm/html/doc/api/npm-prune.html b/deps/npm/html/doc/api/npm-prune.html index 60226a8567..fabfab57d3 100644 --- a/deps/npm/html/doc/api/npm-prune.html +++ b/deps/npm/html/doc/api/npm-prune.html @@ -30,5 +30,5 @@ package's dependencies list.

           - + diff --git a/deps/npm/html/doc/api/npm-publish.html b/deps/npm/html/doc/api/npm-publish.html index 7f5da8c3ee..9d338cebbd 100644 --- a/deps/npm/html/doc/api/npm-publish.html +++ b/deps/npm/html/doc/api/npm-publish.html @@ -46,5 +46,5 @@ the registry. Overwrites when the "force" environment variable is set        - + diff --git a/deps/npm/html/doc/api/npm-rebuild.html b/deps/npm/html/doc/api/npm-rebuild.html index c7d63d0fc9..821becbf54 100644 --- a/deps/npm/html/doc/api/npm-rebuild.html +++ b/deps/npm/html/doc/api/npm-rebuild.html @@ -30,5 +30,5 @@ the new binary. If no 'packages' parameter is specify, every package wil        - + diff --git a/deps/npm/html/doc/api/npm-repo.html b/deps/npm/html/doc/api/npm-repo.html index a596254091..d624659c15 100644 --- a/deps/npm/html/doc/api/npm-repo.html +++ b/deps/npm/html/doc/api/npm-repo.html @@ -33,5 +33,5 @@ friendly for programmatic use.

           - + diff --git a/deps/npm/html/doc/api/npm-restart.html b/deps/npm/html/doc/api/npm-restart.html index 87dd50403e..67729df285 100644 --- a/deps/npm/html/doc/api/npm-restart.html +++ b/deps/npm/html/doc/api/npm-restart.html @@ -36,5 +36,5 @@ in the packages parameter.

           - + diff --git a/deps/npm/html/doc/api/npm-root.html b/deps/npm/html/doc/api/npm-root.html index fbba18e125..4f9b529316 100644 --- a/deps/npm/html/doc/api/npm-root.html +++ b/deps/npm/html/doc/api/npm-root.html @@ -29,5 +29,5 @@        - + diff --git a/deps/npm/html/doc/api/npm-run-script.html b/deps/npm/html/doc/api/npm-run-script.html index 8d040aaeb9..c7ca613833 100644 --- a/deps/npm/html/doc/api/npm-run-script.html +++ b/deps/npm/html/doc/api/npm-run-script.html @@ -41,5 +41,5 @@ assumed to be the command to run. All other elements are ignored.

           - + diff --git a/deps/npm/html/doc/api/npm-search.html b/deps/npm/html/doc/api/npm-search.html index 5e98239914..72fa33509d 100644 --- a/deps/npm/html/doc/api/npm-search.html +++ b/deps/npm/html/doc/api/npm-search.html @@ -53,5 +53,5 @@ like).

           - + diff --git a/deps/npm/html/doc/api/npm-shrinkwrap.html b/deps/npm/html/doc/api/npm-shrinkwrap.html index ef0f99ef4c..172646a9ee 100644 --- a/deps/npm/html/doc/api/npm-shrinkwrap.html +++ b/deps/npm/html/doc/api/npm-shrinkwrap.html @@ -33,5 +33,5 @@ been saved.

           - + diff --git a/deps/npm/html/doc/api/npm-start.html b/deps/npm/html/doc/api/npm-start.html index 356a2f0fde..813b28ce2a 100644 --- a/deps/npm/html/doc/api/npm-start.html +++ b/deps/npm/html/doc/api/npm-start.html @@ -28,5 +28,5 @@ in the packages parameter.

           - + diff --git a/deps/npm/html/doc/api/npm-stop.html b/deps/npm/html/doc/api/npm-stop.html index f49be2c288..65f5c9f26e 100644 --- a/deps/npm/html/doc/api/npm-stop.html +++ b/deps/npm/html/doc/api/npm-stop.html @@ -28,5 +28,5 @@ in the packages parameter.

           - + diff --git a/deps/npm/html/doc/api/npm-submodule.html b/deps/npm/html/doc/api/npm-submodule.html index 018eec5be8..35364403c3 100644 --- a/deps/npm/html/doc/api/npm-submodule.html +++ b/deps/npm/html/doc/api/npm-submodule.html @@ -42,5 +42,5 @@ dependencies into the submodule folder.

           - + diff --git a/deps/npm/html/doc/api/npm-tag.html b/deps/npm/html/doc/api/npm-tag.html index ccd13d4c8a..cf9c71c3c5 100644 --- a/deps/npm/html/doc/api/npm-tag.html +++ b/deps/npm/html/doc/api/npm-tag.html @@ -36,5 +36,5 @@ used. For more information about how to set this config, check        - + diff --git a/deps/npm/html/doc/api/npm-test.html b/deps/npm/html/doc/api/npm-test.html index 9046b085a6..f2d37483ac 100644 --- a/deps/npm/html/doc/api/npm-test.html +++ b/deps/npm/html/doc/api/npm-test.html @@ -30,5 +30,5 @@ in the packages parameter.

           - + diff --git a/deps/npm/html/doc/api/npm-uninstall.html b/deps/npm/html/doc/api/npm-uninstall.html index 3966b89c7b..2abfd08996 100644 --- a/deps/npm/html/doc/api/npm-uninstall.html +++ b/deps/npm/html/doc/api/npm-uninstall.html @@ -30,5 +30,5 @@ uninstalled or when an error has been encountered.

           - + diff --git a/deps/npm/html/doc/api/npm-unpublish.html b/deps/npm/html/doc/api/npm-unpublish.html index 84d199a3ae..f6412cf7d1 100644 --- a/deps/npm/html/doc/api/npm-unpublish.html +++ b/deps/npm/html/doc/api/npm-unpublish.html @@ -33,5 +33,5 @@ the root package entry is removed from the registry entirely.

           - + diff --git a/deps/npm/html/doc/api/npm-update.html b/deps/npm/html/doc/api/npm-update.html index 53d2d515e5..60bcde2654 100644 --- a/deps/npm/html/doc/api/npm-update.html +++ b/deps/npm/html/doc/api/npm-update.html @@ -27,5 +27,5 @@        - + diff --git a/deps/npm/html/doc/api/npm-version.html b/deps/npm/html/doc/api/npm-version.html index 346882258d..8985822164 100644 --- a/deps/npm/html/doc/api/npm-version.html +++ b/deps/npm/html/doc/api/npm-version.html @@ -32,5 +32,5 @@ not have exactly one element. The only element should be a version number.

           - + diff --git a/deps/npm/html/doc/api/npm-view.html b/deps/npm/html/doc/api/npm-view.html index 2888af796d..59f68ee64a 100644 --- a/deps/npm/html/doc/api/npm-view.html +++ b/deps/npm/html/doc/api/npm-view.html @@ -81,5 +81,5 @@ the field name.

           - + diff --git a/deps/npm/html/doc/api/npm-whoami.html b/deps/npm/html/doc/api/npm-whoami.html index d31a2f2351..9380f8664a 100644 --- a/deps/npm/html/doc/api/npm-whoami.html +++ b/deps/npm/html/doc/api/npm-whoami.html @@ -29,5 +29,5 @@        - + diff --git a/deps/npm/html/doc/api/npm.html b/deps/npm/html/doc/api/npm.html index 362c7d13d2..2335b7a226 100644 --- a/deps/npm/html/doc/api/npm.html +++ b/deps/npm/html/doc/api/npm.html @@ -23,7 +23,7 @@ npm.load([configObject, ]function (er, npm) { npm.commands.install(["package"], cb) })

    VERSION

    -

    1.4.23

    +

    1.4.28

    DESCRIPTION

    This is the API documentation for npm. To find documentation of the command line @@ -110,5 +110,5 @@ method names. Use the npm.deref method to find the real name.

           - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 4e84505c96..9a0e55ee60 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -46,5 +46,5 @@ authorize on a new machine.

           - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index aff527838c..d6e055aaa3 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index c6f361a700..8693485aa3 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -54,5 +54,5 @@ a package.json in the current folder and use the name        - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index c5e13816c5..58dfd36fde 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -38,5 +38,5 @@ A folder containing a package.json file in its root.        - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index b9fec6676e..47355abbf2 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -31,5 +31,5 @@ install packages into the local space.

           - + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index 66773f155b..3b84f979dc 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -81,5 +81,5 @@ they do not make an HTTP request to the registry.

           - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index c5181f3979..cc56d45623 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -42,5 +42,5 @@ completions based on the arguments.

           - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index d4fd0dc80d..52efed825b 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -66,5 +66,5 @@ global config.

           - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index ac1779dc8a..f2d9794de9 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -63,5 +63,5 @@ versions.

           - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index 22e36cf899..01640248b5 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@ something like this:

           - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index dcb72ccf8a..05b445cdae 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@ the current folder and use the name property.

           - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index 0c7d4d4571..50d21486a0 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@ or "notepad" on Windows.        - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 891b26584e..c3c3127de6 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -50,5 +50,5 @@ Windows        - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index 1bcf2ddb7d..d09aecf8c1 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -46,5 +46,5 @@ where the terms were found in the documentation.

           - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index 4e481ccf07..bb5a2e1667 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -52,5 +52,5 @@ matches are equivalent to specifying a topic name.

           - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 485f20f86e..ec53ca2567 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -38,5 +38,5 @@ without a really good reason to do so.

           - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index 15a34c16fd..28b6afe39d 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -220,5 +220,5 @@ affects a real use-case, it will be investigated.

           - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index b54706b777..0324ca130e 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -66,5 +66,5 @@ installation target into your project's node_modules folder.

           - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 5560b7a806..0e1fe6f358 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -22,7 +22,7 @@ installed, as well as their dependencies, in a tree-structure.

    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@1.4.23 /path/to/npm
    +
    npm@1.4.28 /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 @@ project.

           - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index e5324f171a..f4b3e1307e 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -67,5 +67,5 @@ project.

           - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 732a1903d9..4dd7b386d6 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -49,5 +49,5 @@ that is not implemented at this time.

           - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index 8e49a639be..b5a68f27b7 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@ overwritten the second time.

           - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 0ed694f38d..56ef84cbc9 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index bc0bb193af..9db5665b33 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -39,5 +39,5 @@ packages specified in your devDependencies.

           - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index e78f18852b..573f72314f 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -54,5 +54,5 @@ it is removed with npm-unpublish(1).

           - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index 349ada1ff6..3334c695f8 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -38,5 +38,5 @@ the new binary.

           - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index 4868a6e858..3ad91979de 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -42,5 +42,5 @@ a package.json in the current folder and use the name        - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index 377b00a346..115765cb07 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -37,5 +37,5 @@ the "start" script.

           - + diff --git a/deps/npm/html/doc/cli/npm-rm.html b/deps/npm/html/doc/cli/npm-rm.html index 8f21ca2059..8622174552 100644 --- a/deps/npm/html/doc/cli/npm-rm.html +++ b/deps/npm/html/doc/cli/npm-rm.html @@ -39,5 +39,5 @@ on its behalf.

           - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index f96202315d..b7be0eab40 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index 75824e1b38..efaed0d945 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -40,5 +40,5 @@ called directly, as well.

           - + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index d4e4ec56de..cbed488646 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -49,5 +49,5 @@ fall on multiple lines.

           - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index 1ada6275aa..37c8c9c05c 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -164,5 +164,5 @@ contents rather than versions.

           - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 73fd449f50..5e98d0f272 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -36,5 +36,5 @@ a vaguely positive way to show that you care.

           - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index 6dfa98d102..c13ede22b8 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -37,5 +37,5 @@ you will most certainly enjoy this command.

           - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 13d8b4117b..305050e41a 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -34,5 +34,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index acc13a1920..519fa856ce 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-submodule.html b/deps/npm/html/doc/cli/npm-submodule.html index 61828b32b8..6716c4a11c 100644 --- a/deps/npm/html/doc/cli/npm-submodule.html +++ b/deps/npm/html/doc/cli/npm-submodule.html @@ -42,5 +42,5 @@ dependencies into the submodule folder.

           - + diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html index 390f27b3c0..40a2ffe89f 100644 --- a/deps/npm/html/doc/cli/npm-tag.html +++ b/deps/npm/html/doc/cli/npm-tag.html @@ -44,5 +44,5 @@ of using a specific version number:

           - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index d12e325838..cc3d56d010 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -37,5 +37,5 @@ true.

           - + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 9fcd72b8dd..4f5a064606 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -55,5 +55,5 @@ npm uninstall dtrace-provider --save-optional        - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 76cc1d4177..be9430a15c 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -46,5 +46,5 @@ package again, a new version number must be used.

           - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index ce37d0f2a4..650fd89f56 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -38,5 +38,5 @@ If no package name is specified, all packages in the specified location (global        - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index ed5c47e6d6..47ca7e5823 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -11,14 +11,14 @@

    npm-version

    Bump a package version

    SYNOPSIS

    -
    npm version [<newversion> | major | minor | patch]
    +
    npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease]
     

    DESCRIPTION

    Run this in a package directory to bump the version and write the new data back to the package.json file.

    -

    The newversion argument should be a valid semver string, or a valid -second argument to semver.inc (one of "patch", "minor", or -"major"). In the second case, the existing version will be incremented -by 1 in the specified field.

    +

    The newversion argument should be a valid semver string, or a +valid second argument to semver.inc (one of "patch", "minor", "major", +"prepatch", "preminor", "premajor", "prerelease"). In the second case, +the existing version will be incremented by 1 in the specified field.

    If run in a git repo, it will also create a version commit and tag, and fail if the repo is not clean.

    If supplied with --message (shorthand: -m) config option, npm will @@ -55,5 +55,5 @@ Enter passphrase:        -

    + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index f14b1caced..c30cc69f12 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -82,5 +82,5 @@ the field name.

           - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 4789c2f254..70dc893cd3 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index f28eb53235..36ae925064 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

    SYNOPSIS

    npm <command> [args]
     

    VERSION

    -

    1.4.23

    +

    1.4.28

    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 @@ easily by doing npm view npm contributors.

    the issues list or ask on the mailing list.

    BUGS

    When you find issues, please report them:

    @@ -118,7 +118,7 @@ the issues list or ask on the mailing list.

  • 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 @@ will no doubt tell you to put the output in a gist or email.

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

    +i@izs.me

    SEE ALSO

    • npm-help(1)
    • @@ -154,5 +154,5 @@ will no doubt tell you to put the output in a gist or email.

             - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index fb351e684b..637b45c382 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -179,5 +179,5 @@ cannot be found elsewhere. See packa        - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index fb351e684b..637b45c382 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -179,5 +179,5 @@ cannot be found elsewhere. See packa        - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index 98147f0983..129661d526 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -459,5 +459,5 @@ ignored.

             - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index 73a537bc8f..ee029cfe8f 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -73,5 +73,5 @@ manner.

             - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index 98147f0983..129661d526 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -459,5 +459,5 @@ ignored.

             - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 036cbeab1f..90c300c88f 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -10,211 +10,215 @@

      npm-index

      Index of all npm documentation

      -

      README

      +

      README

      node package manager

      -

      Command Line Documentation

      -

      npm(1)

      +

      Command Line Documentation

      +

      Using npm on the command line

      +

      npm(1)

      node package manager

      -

      npm-adduser(1)

      +

      npm-adduser(1)

      Add a registry user account

      -

      npm-bin(1)

      +

      npm-bin(1)

      Display npm bin folder

      -

      npm-bugs(1)

      +

      npm-bugs(1)

      Bugs for a package in a web browser maybe

      -

      npm-build(1)

      +

      npm-build(1)

      Build a package

      -

      npm-bundle(1)

      +

      npm-bundle(1)

      REMOVED

      -

      npm-cache(1)

      +

      npm-cache(1)

      Manipulates packages cache

      -

      npm-completion(1)

      +

      npm-completion(1)

      Tab Completion for npm

      -

      npm-config(1)

      +

      npm-config(1)

      Manage the npm configuration files

      -

      npm-dedupe(1)

      +

      npm-dedupe(1)

      Reduce duplication

      -

      npm-deprecate(1)

      +

      npm-deprecate(1)

      Deprecate a version of a package

      -

      npm-docs(1)

      +

      npm-docs(1)

      Docs for a package in a web browser maybe

      -

      npm-edit(1)

      +

      npm-edit(1)

      Edit an installed package

      -

      npm-explore(1)

      +

      npm-explore(1)

      Browse an installed package

      -

      npm-help-search(1)

      +

      npm-help-search(1)

      Search npm help documentation

      -

      npm-help(1)

      +

      npm-help(1)

      Get help on npm

      -

      npm-init(1)

      +

      npm-init(1)

      Interactively create a package.json file

      -

      npm-install(1)

      +

      npm-install(1)

      Install a package

      - +

      Symlink a package folder

      -

      npm-ls(1)

      +

      npm-ls(1)

      List installed packages

      -

      npm-outdated(1)

      +

      npm-outdated(1)

      Check for outdated packages

      -

      npm-owner(1)

      +

      npm-owner(1)

      Manage package owners

      -

      npm-pack(1)

      +

      npm-pack(1)

      Create a tarball from a package

      -

      npm-prefix(1)

      +

      npm-prefix(1)

      Display prefix

      -

      npm-prune(1)

      +

      npm-prune(1)

      Remove extraneous packages

      -

      npm-publish(1)

      +

      npm-publish(1)

      Publish a package

      -

      npm-rebuild(1)

      +

      npm-rebuild(1)

      Rebuild a package

      -

      npm-repo(1)

      +

      npm-repo(1)

      Open package repository page in the browser

      -

      npm-restart(1)

      +

      npm-restart(1)

      Start a package

      -

      npm-rm(1)

      +

      npm-rm(1)

      Remove a package

      -

      npm-root(1)

      +

      npm-root(1)

      Display npm root

      -

      npm-run-script(1)

      +

      npm-run-script(1)

      Run arbitrary package scripts

      -

      npm-search(1)

      +

      npm-search(1)

      Search for packages

      -

      npm-shrinkwrap(1)

      +

      npm-shrinkwrap(1)

      Lock down dependency versions

      -

      npm-star(1)

      +

      npm-star(1)

      Mark your favorite packages

      -

      npm-stars(1)

      +

      npm-stars(1)

      View packages marked as favorites

      -

      npm-start(1)

      +

      npm-start(1)

      Start a package

      -

      npm-stop(1)

      +

      npm-stop(1)

      Stop a package

      -

      npm-submodule(1)

      +

      npm-submodule(1)

      Add a package as a git submodule

      -

      npm-tag(1)

      +

      npm-tag(1)

      Tag a published version

      -

      npm-test(1)

      +

      npm-test(1)

      Test a package

      -

      npm-uninstall(1)

      +

      npm-uninstall(1)

      Remove a package

      -

      npm-unpublish(1)

      +

      npm-unpublish(1)

      Remove a package from the registry

      -

      npm-update(1)

      +

      npm-update(1)

      Update a package

      -

      npm-version(1)

      +

      npm-version(1)

      Bump a package version

      -

      npm-view(1)

      +

      npm-view(1)

      View registry info

      -

      npm-whoami(1)

      +

      npm-whoami(1)

      Display npm username

      -

      API Documentation

      -

      npm(3)

      +

      API Documentation

      +

      Using npm in your Node programs

      +

      npm(3)

      node package manager

      -

      npm-bin(3)

      +

      npm-bin(3)

      Display npm bin folder

      -

      npm-bugs(3)

      +

      npm-bugs(3)

      Bugs for a package in a web browser maybe

      -

      npm-cache(3)

      +

      npm-cache(3)

      manage the npm cache programmatically

      -

      npm-commands(3)

      +

      npm-commands(3)

      npm commands

      -

      npm-config(3)

      +

      npm-config(3)

      Manage the npm configuration files

      -

      npm-deprecate(3)

      +

      npm-deprecate(3)

      Deprecate a version of a package

      -

      npm-docs(3)

      +

      npm-docs(3)

      Docs for a package in a web browser maybe

      -

      npm-edit(3)

      +

      npm-edit(3)

      Edit an installed package

      -

      npm-explore(3)

      +

      npm-explore(3)

      Browse an installed package

      -

      npm-help-search(3)

      +

      npm-help-search(3)

      Search the help pages

      -

      npm-init(3)

      +

      npm-init(3)

      Interactively create a package.json file

      -

      npm-install(3)

      +

      npm-install(3)

      install a package programmatically

      - +

      Symlink a package folder

      -

      npm-load(3)

      +

      npm-load(3)

      Load config settings

      -

      npm-ls(3)

      +

      npm-ls(3)

      List installed packages

      -

      npm-outdated(3)

      +

      npm-outdated(3)

      Check for outdated packages

      -

      npm-owner(3)

      +

      npm-owner(3)

      Manage package owners

      -

      npm-pack(3)

      +

      npm-pack(3)

      Create a tarball from a package

      -

      npm-prefix(3)

      +

      npm-prefix(3)

      Display prefix

      -

      npm-prune(3)

      +

      npm-prune(3)

      Remove extraneous packages

      -

      npm-publish(3)

      +

      npm-publish(3)

      Publish a package

      -

      npm-rebuild(3)

      +

      npm-rebuild(3)

      Rebuild a package

      -

      npm-repo(3)

      +

      npm-repo(3)

      Open package repository page in the browser

      -

      npm-restart(3)

      +

      npm-restart(3)

      Start a package

      -

      npm-root(3)

      +

      npm-root(3)

      Display npm root

      -

      npm-run-script(3)

      +

      npm-run-script(3)

      Run arbitrary package scripts

      -

      npm-search(3)

      +

      npm-search(3)

      Search for packages

      -

      npm-shrinkwrap(3)

      +

      npm-shrinkwrap(3)

      programmatically generate package shrinkwrap file

      -

      npm-start(3)

      +

      npm-start(3)

      Start a package

      -

      npm-stop(3)

      +

      npm-stop(3)

      Stop a package

      -

      npm-submodule(3)

      +

      npm-submodule(3)

      Add a package as a git submodule

      -

      npm-tag(3)

      +

      npm-tag(3)

      Tag a published version

      -

      npm-test(3)

      +

      npm-test(3)

      Test a package

      -

      npm-uninstall(3)

      +

      npm-uninstall(3)

      uninstall a package programmatically

      -

      npm-unpublish(3)

      +

      npm-unpublish(3)

      Remove a package from the registry

      -

      npm-update(3)

      +

      npm-update(3)

      Update a package

      -

      npm-version(3)

      +

      npm-version(3)

      Bump a package version

      -

      npm-view(3)

      +

      npm-view(3)

      View registry info

      -

      npm-whoami(3)

      +

      npm-whoami(3)

      Display npm username

      -

      Files

      -

      npm-folders(5)

      +

      Files

      +

      File system structures npm uses

      +

      npm-folders(5)

      Folder Structures Used by npm

      -

      npmrc(5)

      +

      npmrc(5)

      The npm config files

      -

      package.json(5)

      +

      package.json(5)

      Specifics of npm's package.json handling

      -

      Misc

      -

      npm-coding-style(7)

      +

      Misc

      +

      Various other bits and bobs

      +

      npm-coding-style(7)

      npm's "funny" coding style

      -

      npm-config(7)

      +

      npm-config(7)

      More than you probably want to know about npm configuration

      -

      npm-developers(7)

      +

      npm-developers(7)

      Developer Guide

      -

      npm-disputes(7)

      +

      npm-disputes(7)

      Handling Module Name Disputes

      -

      npm-faq(7)

      +

      npm-faq(7)

      Frequently Asked Questions

      -

      npm-index(7)

      +

      npm-index(7)

      Index of all npm documentation

      -

      npm-registry(7)

      +

      npm-registry(7)

      The JavaScript Package Registry

      -

      npm-scripts(7)

      +

      npm-scripts(7)

      How npm handles the "scripts" field

      -

      removing-npm(7)

      +

      removing-npm(7)

      Cleaning the Slate

      -

      semver(7)

      +

      semver(7)

      The semantic versioner for npm

      @@ -228,5 +232,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index 5a0e3dce31..cd523ac910 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -147,5 +147,5 @@ set to anything."

             - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index 96328e12d1..aa4c300bfa 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -749,5 +749,5 @@ hash, and exit successfully.

             - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 845431594b..3cc1b0466c 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -181,5 +181,5 @@ from a fresh checkout.

             - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index 679b65ec80..7a45340936 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -13,7 +13,7 @@

      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.

      @@ -51,12 +51,12 @@ Joe's appropriate course of action in each case is the same.

      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.)
    • @@ -112,5 +112,5 @@ things into it.        - + diff --git a/deps/npm/html/doc/misc/npm-faq.html b/deps/npm/html/doc/misc/npm-faq.html index 959892125e..cdde512eee 100644 --- a/deps/npm/html/doc/misc/npm-faq.html +++ b/deps/npm/html/doc/misc/npm-faq.html @@ -237,7 +237,7 @@ that has a package.json in its root, or a git url.

      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.

      @@ -285,5 +285,5 @@ good folks at npm, Inc.

             - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index fe7c951d30..3346d1ce98 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -10,211 +10,215 @@

      npm-index

      Index of all npm documentation

      -

      README

      +

      README

      node package manager

      -

      Command Line Documentation

      -

      npm(1)

      +

      Command Line Documentation

      +

      Using npm on the command line

      +

      npm(1)

      node package manager

      -

      npm-adduser(1)

      +

      npm-adduser(1)

      Add a registry user account

      -

      npm-bin(1)

      +

      npm-bin(1)

      Display npm bin folder

      -

      npm-bugs(1)

      +

      npm-bugs(1)

      Bugs for a package in a web browser maybe

      -

      npm-build(1)

      +

      npm-build(1)

      Build a package

      -

      npm-bundle(1)

      +

      npm-bundle(1)

      REMOVED

      -

      npm-cache(1)

      +

      npm-cache(1)

      Manipulates packages cache

      -

      npm-completion(1)

      +

      npm-completion(1)

      Tab Completion for npm

      -

      npm-config(1)

      +

      npm-config(1)

      Manage the npm configuration files

      -

      npm-dedupe(1)

      +

      npm-dedupe(1)

      Reduce duplication

      -

      npm-deprecate(1)

      +

      npm-deprecate(1)

      Deprecate a version of a package

      -

      npm-docs(1)

      +

      npm-docs(1)

      Docs for a package in a web browser maybe

      -

      npm-edit(1)

      +

      npm-edit(1)

      Edit an installed package

      -

      npm-explore(1)

      +

      npm-explore(1)

      Browse an installed package

      -

      npm-help-search(1)

      +

      npm-help-search(1)

      Search npm help documentation

      -

      npm-help(1)

      +

      npm-help(1)

      Get help on npm

      -

      npm-init(1)

      +

      npm-init(1)

      Interactively create a package.json file

      -

      npm-install(1)

      +

      npm-install(1)

      Install a package

      - +

      Symlink a package folder

      -

      npm-ls(1)

      +

      npm-ls(1)

      List installed packages

      -

      npm-outdated(1)

      +

      npm-outdated(1)

      Check for outdated packages

      -

      npm-owner(1)

      +

      npm-owner(1)

      Manage package owners

      -

      npm-pack(1)

      +

      npm-pack(1)

      Create a tarball from a package

      -

      npm-prefix(1)

      +

      npm-prefix(1)

      Display prefix

      -

      npm-prune(1)

      +

      npm-prune(1)

      Remove extraneous packages

      -

      npm-publish(1)

      +

      npm-publish(1)

      Publish a package

      -

      npm-rebuild(1)

      +

      npm-rebuild(1)

      Rebuild a package

      -

      npm-repo(1)

      +

      npm-repo(1)

      Open package repository page in the browser

      -

      npm-restart(1)

      +

      npm-restart(1)

      Start a package

      -

      npm-rm(1)

      +

      npm-rm(1)

      Remove a package

      -

      npm-root(1)

      +

      npm-root(1)

      Display npm root

      -

      npm-run-script(1)

      +

      npm-run-script(1)

      Run arbitrary package scripts

      -

      npm-search(1)

      +

      npm-search(1)

      Search for packages

      -

      npm-shrinkwrap(1)

      +

      npm-shrinkwrap(1)

      Lock down dependency versions

      -

      npm-star(1)

      +

      npm-star(1)

      Mark your favorite packages

      -

      npm-stars(1)

      +

      npm-stars(1)

      View packages marked as favorites

      -

      npm-start(1)

      +

      npm-start(1)

      Start a package

      -

      npm-stop(1)

      +

      npm-stop(1)

      Stop a package

      -

      npm-submodule(1)

      +

      npm-submodule(1)

      Add a package as a git submodule

      -

      npm-tag(1)

      +

      npm-tag(1)

      Tag a published version

      -

      npm-test(1)

      +

      npm-test(1)

      Test a package

      -

      npm-uninstall(1)

      +

      npm-uninstall(1)

      Remove a package

      -

      npm-unpublish(1)

      +

      npm-unpublish(1)

      Remove a package from the registry

      -

      npm-update(1)

      +

      npm-update(1)

      Update a package

      -

      npm-version(1)

      +

      npm-version(1)

      Bump a package version

      -

      npm-view(1)

      +

      npm-view(1)

      View registry info

      -

      npm-whoami(1)

      +

      npm-whoami(1)

      Display npm username

      -

      API Documentation

      -

      npm(3)

      +

      API Documentation

      +

      Using npm in your Node programs

      +

      npm(3)

      node package manager

      -

      npm-bin(3)

      +

      npm-bin(3)

      Display npm bin folder

      -

      npm-bugs(3)

      +

      npm-bugs(3)

      Bugs for a package in a web browser maybe

      -

      npm-cache(3)

      +

      npm-cache(3)

      manage the npm cache programmatically

      -

      npm-commands(3)

      +

      npm-commands(3)

      npm commands

      -

      npm-config(3)

      +

      npm-config(3)

      Manage the npm configuration files

      -

      npm-deprecate(3)

      +

      npm-deprecate(3)

      Deprecate a version of a package

      -

      npm-docs(3)

      +

      npm-docs(3)

      Docs for a package in a web browser maybe

      -

      npm-edit(3)

      +

      npm-edit(3)

      Edit an installed package

      -

      npm-explore(3)

      +

      npm-explore(3)

      Browse an installed package

      -

      npm-help-search(3)

      +

      npm-help-search(3)

      Search the help pages

      -

      npm-init(3)

      +

      npm-init(3)

      Interactively create a package.json file

      -

      npm-install(3)

      +

      npm-install(3)

      install a package programmatically

      - +

      Symlink a package folder

      -

      npm-load(3)

      +

      npm-load(3)

      Load config settings

      -

      npm-ls(3)

      +

      npm-ls(3)

      List installed packages

      -

      npm-outdated(3)

      +

      npm-outdated(3)

      Check for outdated packages

      -

      npm-owner(3)

      +

      npm-owner(3)

      Manage package owners

      -

      npm-pack(3)

      +

      npm-pack(3)

      Create a tarball from a package

      -

      npm-prefix(3)

      +

      npm-prefix(3)

      Display prefix

      -

      npm-prune(3)

      +

      npm-prune(3)

      Remove extraneous packages

      -

      npm-publish(3)

      +

      npm-publish(3)

      Publish a package

      -

      npm-rebuild(3)

      +

      npm-rebuild(3)

      Rebuild a package

      -

      npm-repo(3)

      +

      npm-repo(3)

      Open package repository page in the browser

      -

      npm-restart(3)

      +

      npm-restart(3)

      Start a package

      -

      npm-root(3)

      +

      npm-root(3)

      Display npm root

      -

      npm-run-script(3)

      +

      npm-run-script(3)

      Run arbitrary package scripts

      -

      npm-search(3)

      +

      npm-search(3)

      Search for packages

      -

      npm-shrinkwrap(3)

      +

      npm-shrinkwrap(3)

      programmatically generate package shrinkwrap file

      -

      npm-start(3)

      +

      npm-start(3)

      Start a package

      -

      npm-stop(3)

      +

      npm-stop(3)

      Stop a package

      -

      npm-submodule(3)

      +

      npm-submodule(3)

      Add a package as a git submodule

      -

      npm-tag(3)

      +

      npm-tag(3)

      Tag a published version

      -

      npm-test(3)

      +

      npm-test(3)

      Test a package

      -

      npm-uninstall(3)

      +

      npm-uninstall(3)

      uninstall a package programmatically

      -

      npm-unpublish(3)

      +

      npm-unpublish(3)

      Remove a package from the registry

      -

      npm-update(3)

      +

      npm-update(3)

      Update a package

      -

      npm-version(3)

      +

      npm-version(3)

      Bump a package version

      -

      npm-view(3)

      +

      npm-view(3)

      View registry info

      -

      npm-whoami(3)

      +

      npm-whoami(3)

      Display npm username

      -

      Files

      -

      npm-folders(5)

      +

      Files

      +

      File system structures npm uses

      +

      npm-folders(5)

      Folder Structures Used by npm

      -

      npmrc(5)

      +

      npmrc(5)

      The npm config files

      -

      package.json(5)

      +

      package.json(5)

      Specifics of npm's package.json handling

      -

      Misc

      -

      npm-coding-style(7)

      +

      Misc

      +

      Various other bits and bobs

      +

      npm-coding-style(7)

      npm's "funny" coding style

      -

      npm-config(7)

      +

      npm-config(7)

      More than you probably want to know about npm configuration

      -

      npm-developers(7)

      +

      npm-developers(7)

      Developer Guide

      -

      npm-disputes(7)

      +

      npm-disputes(7)

      Handling Module Name Disputes

      -

      npm-faq(7)

      +

      npm-faq(7)

      Frequently Asked Questions

      -

      npm-index(7)

      +

      npm-index(7)

      Index of all npm documentation

      -

      npm-registry(7)

      +

      npm-registry(7)

      The JavaScript Package Registry

      -

      npm-scripts(7)

      +

      npm-scripts(7)

      How npm handles the "scripts" field

      -

      removing-npm(7)

      +

      removing-npm(7)

      Cleaning the Slate

      -

      semver(7)

      +

      semver(7)

      The semantic versioner for npm

      @@ -228,5 +232,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index fe1c6cc538..d08e8f877d 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -71,5 +71,5 @@ effectively implement the entire CouchDB API anyway.

             - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html new file mode 100644 index 0000000000..ae8dfa6037 --- /dev/null +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -0,0 +1,82 @@ + + + npm-scope + + + + + + +
      + +

      npm-scope

      Scoped packages

      +

      DESCRIPTION

      +

      All npm packages have a name. Some package names also have a scope. A scope +follows the usual rules for package names (url-safe characters, no leading dots +or underscores). When used in package names, preceded by an @-symbol and +followed by a slash, e.g.

      +
      @somescope/somepackagename
      +

      Scopes are a way of grouping related packages together, and also affect a few +things about the way npm treats the package.

      +

      As of 2014-09-03, scoped packages are not supported by the public npm registry. +However, the npm client is backwards-compatible with un-scoped registries, so +it can be used to work with scoped and un-scoped registries at the same time.

      +

      Installing scoped packages

      +

      Scoped packages are installed to a sub-folder of the regular installation +folder, e.g. if your other packages are installed in node_modules/packagename, +scoped modules will be in node_modules/@myorg/packagename. The scope folder +(@myorg) is simply the name of the scope preceded by an @-symbol, and can +contain any number of scoped packages.

      +

      A scoped package is install by referencing it by name, preceded by an @-symbol, +in npm install:

      +
      npm install @myorg/mypackage
      +

      Or in package.json:

      +
      "dependencies": {
      +  "@myorg/mypackage": "^1.3.0"
      +}
      +

      Note that if the @-symbol is omitted in either case npm will instead attempt to +install from GitHub; see npm-install(1).

      +

      Requiring scoped packages

      +

      Because scoped packages are installed into a scope folder, you have to +include the name of the scope when requiring them in your code, e.g.

      +
      require('@myorg/mypackage')
      +

      There is nothing special about the way Node treats scope folders, this is +just specifying to require the module mypackage in the folder called @myorg.

      +

      Publishing scoped packages

      +

      Scoped packages can be published to any registry that supports them. +As of 2014-09-03, the public npm registry does not support scoped packages, +so attempting to publish a scoped package to the registry will fail unless +you have associated that scope with a different registry, see below.

      +

      Associating a scope with a registry

      +

      Scopes can be associated with a separate registry. This allows you to +seamlessly use a mix of packages from the public npm registry and one or more +private registries, such as npm Enterprise.

      +

      You can associate a scope with a registry at login, e.g.

      +
      npm login --registry=http://reg.example.com --scope=@myco
      +

      Scopes have a many-to-one relationship with registries: one registry can +host multiple scopes, but a scope only ever points to one registry.

      +

      You can also associate a scope with a registry using npm config:

      +
      npm config set @myco:registry http://reg.example.com
      +

      Once a scope is associated with a registry, any npm install for a package +with that scope will request packages from that registry instead. Any +npm publish for a package name that contains the scope will be published to +that registry instead.

      +

      SEE ALSO

      + + +
      + + + + + + + + + + + + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index 62c1f80436..0c2c697a50 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -218,5 +218,5 @@ the user will sudo the npm command in question.        - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index cb3b85e1d0..afd747c956 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -57,5 +57,5 @@ modules. To track those down, you can do the following:

             - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index 84f04d273f..5ab35fa819 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -165,5 +165,5 @@ range, use the satisfies(version, range) function.

             - + diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index 8f20bc8396..9d2c2cfa27 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -880,10 +880,8 @@ function write (target, targetFolder, context, cb_) { if (!er) return cb_(er, data) if (false === npm.config.get("rollback")) return cb_(er) - npm.commands.unbuild([targetFolder], true, function (er2) { - if (er2) log.error("error rolling back", target._id, er2) - return cb_(er, data) - }) + npm.rollbacks.push(targetFolder) + cb_(er, data) } var bundled = [] diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index c7288e2b77..3139b1d145 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -38,6 +38,8 @@ npm.config = { npm.commands = {} +npm.rollbacks = [] + try { var pv = process.version.replace(/^v/, '') // startup, ok to do this synchronously diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index 089c71228b..5c4f4c99e8 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -9,6 +9,8 @@ var cbCalled = false , path = require("path") , wroteLogFile = false , exitCode = 0 + , rollbacks = npm.rollbacks + , chain = require("slide").chain process.on("exit", function (code) { @@ -50,8 +52,24 @@ function exit (code, noLog) { log.verbose("exit", [code, doExit]) if (log.level === "silent") noLog = true - if (code && !noLog) writeLogFile(reallyExit) - else rm("npm-debug.log", function () { rm(npm.tmp, reallyExit) }) + if (rollbacks.length) { + chain(rollbacks.map(function (f) { + return function (cb) { + npm.commands.unbuild([f], true, cb) + } + }), function (er) { + if (er) { + log.error("error rolling back", er) + if (!code) errorHandler(er) + else reallyExit(er) + } else { + rm("npm-debug.log", reallyExit) + } + }) + rollbacks.length = 0 + } + else if (code && !noLog) writeLogFile(reallyExit) + else reallyExit() function reallyExit() { // truncate once it's been written. diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js index af009cc215..8bcb99689f 100644 --- a/deps/npm/lib/utils/lifecycle.js +++ b/deps/npm/lib/utils/lifecycle.js @@ -96,24 +96,23 @@ function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) { env.npm_lifecycle_script = pkg.scripts[stage] } - if (failOk) { - cb = (function (cb_) { return function (er) { - if (er) log.warn("continuing anyway", er.message) - cb_() - }})(cb) - } - - if (npm.config.get("force")) { - cb = (function (cb_) { return function (er) { - if (er) log.info("forced, continuing", er) - cb_() - }})(cb) + function done (er) { + if (er) { + if (npm.config.get("force")) { + log.info("forced, continuing", er) + er = null + } else if (failOk) { + log.warn("continuing anyway", er.message) + er = null + } + } + cb(er) } chain ( [ packageLifecycle && [runPackageLifecycle, pkg, env, wd, unsafe] , [runHookLifecycle, pkg, env, wd, unsafe] ] - , cb ) + , done ) } function validWd (d, cb) { @@ -210,12 +209,17 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { } var proc = spawn(sh, [shFlag, cmd], conf) + proc.on("error", procError) proc.on("close", function (code, signal) { if (signal) { process.kill(process.pid, signal); } else if (code) { var er = new Error("Exit status " + code) } + procError(er) + }) + + function procError (er) { if (er && !npm.ROLLBACK) { log.info(pkg._id, "Failed to exec "+stage+" script") er.message = pkg._id + " " @@ -235,7 +239,7 @@ function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { return cb() } cb(er) - }) + } } diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js index 3121bb0289..192de7a26a 100644 --- a/deps/npm/lib/utils/tar.js +++ b/deps/npm/lib/utils/tar.js @@ -240,6 +240,7 @@ function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) { extractOpts.gid = gid } + var sawIgnores = {} extractOpts.filter = function () { // symbolic links are not allowed in packages. if (this.type.match(/^.*Link$/)) { @@ -248,6 +249,28 @@ function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) { + " -> " + this.linkpath ) return false } + + // Note: This mirrors logic in the fs read operations that are + // employed during tarball creation, in the fstream-npm module. + // It is duplicated here to handle tarballs that are created + // using other means, such as system tar or git archive. + if (this.type === "File") { + var base = path.basename(this.path) + if (base === ".npmignore") { + sawIgnores[ this.path ] = true + } else if (base === ".gitignore") { + var npmignore = this.path.replace(/\.gitignore$/, ".npmignore") + if (sawIgnores[npmignore]) { + // Skip this one, already seen. + return false + } else { + // Rename, may be clobbered later. + this.path = npmignore + this._path = npmignore + } + } + } + return true } @@ -277,7 +300,8 @@ function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) { cb(er) }) .on("close", cb) - } else if (c.toString().match(/^package\//)) { + } else if (c.toString().match(/^package\//) || + c.toString().match(/^pax_global_header/)) { // naked tar fst .pipe(tar.Extract(extractOpts)) diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index 2538040eca..cfa8b45983 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM" "1" "July 2014" "" "" +.TH "NPM" "1" "September 2014" "" "" . .SH "NAME" \fBnpm\fR \-\- node package manager![Build Status \fIhttps://img\.shields\.io/travis/npm/npm/master\.svg)](https://travis\-ci\.org/npm/npm\fR @@ -329,13 +329,13 @@ will no doubt tell you to put the output in a gist or email\. npm help npm . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 npm help help . .IP "\(bu" 4 -npm help index +npm help 7 index . .IP "" 0 diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index 9d59ebf66e..da1dcdbc3f 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-ADDUSER" "1" "July 2014" "" "" +.TH "NPM\-ADDUSER" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-adduser\fR \-\- Add a registry user account @@ -42,16 +42,16 @@ The base URL of the npm package registry\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 npm help owner diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index 7924feb095..548bb6ad34 100644 --- a/deps/npm/man/man1/npm-bin.1 +++ b/deps/npm/man/man1/npm-bin.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-BIN" "1" "July 2014" "" "" +.TH "NPM\-BIN" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-bin\fR \-\- Display npm bin folder @@ -25,16 +25,16 @@ npm help prefix npm help root . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "" 0 diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index 751bbe5241..328ac30451 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-BUGS" "1" "July 2014" "" "" +.TH "NPM\-BUGS" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe @@ -60,19 +60,19 @@ npm help view npm help publish . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "" 0 diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1 index ac79ebfdf5..cc815b63b5 100644 --- a/deps/npm/man/man1/npm-build.1 +++ b/deps/npm/man/man1/npm-build.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-BUILD" "1" "July 2014" "" "" +.TH "NPM\-BUILD" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-build\fR \-\- Build a package @@ -34,10 +34,10 @@ npm help install npm help link . .IP "\(bu" 4 -npm help scripts +npm help 7 scripts . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "" 0 diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1 index 6fa075febf..5799f4b19d 100644 --- a/deps/npm/man/man1/npm-bundle.1 +++ b/deps/npm/man/man1/npm-bundle.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-BUNDLE" "1" "July 2014" "" "" +.TH "NPM\-BUNDLE" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-bundle\fR \-\- REMOVED diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 75dc4ef713..3977da0b1a 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-CACHE" "1" "July 2014" "" "" +.TH "NPM\-CACHE" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-cache\fR \-\- Manipulates packages cache @@ -76,16 +76,16 @@ The root cache folder\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 npm help install diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index a561f66374..2ae25687a6 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-COMPLETION" "1" "July 2014" "" "" +.TH "NPM\-COMPLETION" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-completion\fR \-\- Tab Completion for npm @@ -35,10 +35,10 @@ completions based on the arguments\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help developers +npm help 7 developers . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 npm help npm diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index bc07b65774..0b019c7c02 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-CONFIG" "1" "July 2014" "" "" +.TH "NPM\-CONFIG" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-config\fR \-\- Manage the npm configuration files @@ -25,10 +25,10 @@ npm gets its config settings from the command line, environment variables, \fBnpmrc\fR files, and in some cases, the \fBpackage\.json\fR file\. . .P -npm help See npmrc for more information about the npmrc files\. +See npm help 5 npmrc for more information about the npmrc files\. . .P -npm help See \fBnpm\-config\fR for a more thorough discussion of the mechanisms +See npm help 7 \fBnpm\-config\fR for a more thorough discussion of the mechanisms involved\. . .P @@ -95,16 +95,16 @@ global config\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 npm help npm diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index 104993d2b8..cdfa3520f6 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-DEDUPE" "1" "July 2014" "" "" +.TH "NPM\-DEDUPE" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-dedupe\fR \-\- Reduce duplication @@ -36,7 +36,7 @@ a .IP "" 0 . .P -npm help In this case, \fBnpm\-dedupe\fR will transform the tree to: +In this case, npm help \fBnpm\-dedupe\fR will transform the tree to: . .IP "" 4 . diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index 7c312f0c40..cc2d18ee52 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-DEPRECATE" "1" "July 2014" "" "" +.TH "NPM\-DEPRECATE" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-deprecate\fR \-\- Deprecate a version of a package @@ -42,7 +42,7 @@ To un\-deprecate a package, specify an empty string (\fB""\fR) for the \fBmessag npm help publish . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "" 0 diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index 3886aac406..db3d4e768f 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-DOCS" "1" "July 2014" "" "" +.TH "NPM\-DOCS" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-docs\fR \-\- Docs for a package in a web browser maybe @@ -60,19 +60,19 @@ npm help view npm help publish . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "" 0 diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 41000e8ce6..036d0715a4 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-EDIT" "1" "July 2014" "" "" +.TH "NPM\-EDIT" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-edit\fR \-\- Edit an installed package @@ -15,7 +15,7 @@ npm edit [@] . .SH "DESCRIPTION" Opens the package folder in the default editor (or whatever you\'ve -npm help configured as the npm \fBeditor\fR config \-\- see \fBnpm\-config\fR\|\.) +configured as the npm \fBeditor\fR config \-\- see npm help 7 \fBnpm\-config\fR\|\.) . .P After it has been edited, the package is rebuilt so as to pick up any @@ -45,7 +45,7 @@ The command to run for \fBnpm edit\fR or \fBnpm config edit\fR\|\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help explore @@ -57,10 +57,10 @@ npm help install npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "" 0 diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index a4ff63f37f..c7d570745c 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-EXPLORE" "1" "July 2014" "" "" +.TH "NPM\-EXPLORE" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-explore\fR \-\- Browse an installed package @@ -58,7 +58,7 @@ The shell to run for the \fBnpm explore\fR command\. npm help submodule . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help edit diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index a4eda6e502..37ba03c796 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-HELP\-SEARCH" "1" "July 2014" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-help-search\fR \-\- Search npm help documentation @@ -50,7 +50,7 @@ If false, then help\-search will just list out the help topics found\. npm help npm . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 npm help help diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index 040107bd77..7cc361f463 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-HELP" "1" "July 2014" "" "" +.TH "NPM\-HELP" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-help\fR \-\- Get help on npm @@ -50,28 +50,28 @@ npm help npm README . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 npm help help\-search . .IP "\(bu" 4 -npm help index +npm help 7 index . .IP "" 0 diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 3f69ef18b4..5091fdefd8 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-INIT" "1" "July 2014" "" "" +.TH "NPM\-INIT" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-init\fR \-\- Interactively create a package\.json file @@ -34,7 +34,7 @@ without a really good reason to do so\. \fIhttps://github\.com/isaacs/init\-package\-json\fR . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 npm help version diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index 4501ab8a56..7e874f3490 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-INSTALL" "1" "July 2014" "" "" +.TH "NPM\-INSTALL" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-install\fR \-\- Install a package @@ -24,7 +24,7 @@ npm i (with any of the previous argument usage) .SH "DESCRIPTION" This command installs a package, and any packages that it depends on\. If the package has a shrinkwrap file, the installation of dependencies will be driven -npm help by that\. See npm\-shrinkwrap\. +by that\. See npm help shrinkwrap\. . .P A \fBpackage\fR is: @@ -39,7 +39,7 @@ b) a gzipped tarball containing (a) c) a url that resolves to (b) . .IP "\(bu" 4 -d) a \fB@\fR that is published on the registry (npm help see \fBnpm\-registry\fR) with (c) +d) a \fB@\fR that is published on the registry (see npm help 7 \fBnpm\-registry\fR) with (c) . .IP "\(bu" 4 e) a \fB@\fR that points to (d) @@ -125,7 +125,7 @@ Example: \fBnpm install [\-\-save|\-\-save\-dev|\-\-save\-optional]\fR: . .IP -Do a \fB@\fR install, where \fB\fR is the "tag" config\. (npm help See \fBnpm\-config\fR\|\.) +Do a \fB@\fR install, where \fB\fR is the "tag" config\. (See npm help 7 \fBnpm\-config\fR\|\.) . .IP In most cases, this will install the latest version @@ -222,7 +222,7 @@ Example: . .IP Install a version of the package matching the specified version range\. This -npm help will follow the same rules for resolving dependencies described in \fBpackage\.json\fR\|\. +will follow the same rules for resolving dependencies described in npm help 5 \fBpackage\.json\fR\|\. . .IP Note that most version ranges must be put in quotes so that your shell will @@ -298,7 +298,7 @@ npm install sax \-\-force . .P The \fB\-\-global\fR argument will cause npm to install the package globally -npm help rather than locally\. See \fBnpm\-folders\fR\|\. +rather than locally\. See npm help 5 \fBnpm\-folders\fR\|\. . .P The \fB\-\-link\fR argument will cause npm to link global installs into the @@ -321,7 +321,7 @@ The \fB\-\-nodedir=/path/to/node/source\fR argument will allow npm to find the node source code so that npm can compile native modules\. . .P -npm help See \fBnpm\-config\fR\|\. Many of the configuration params have some +See npm help 7 \fBnpm\-config\fR\|\. Many of the configuration params have some effect on installation, since that\'s most of what npm does\. . .SH "ALGORITHM" @@ -365,7 +365,7 @@ That is, the dependency from B to C is satisfied by the fact that A already caused C to be installed at a higher level\. . .P -npm help See npm\-folders for a more detailed description of the specific +See npm help 5 folders for a more detailed description of the specific folder structures that npm creates\. . .SS "Limitations of npm's Install Algorithm" @@ -399,7 +399,7 @@ affects a real use\-case, it will be investigated\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help update @@ -411,7 +411,7 @@ npm help link npm help rebuild . .IP "\(bu" 4 -npm help scripts +npm help 7 scripts . .IP "\(bu" 4 npm help build @@ -420,13 +420,13 @@ npm help build npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help tag diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index ad3baf80cb..15d45e4e07 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-LINK" "1" "July 2014" "" "" +.TH "NPM\-LINK" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-link\fR \-\- Symlink a package folder @@ -92,28 +92,28 @@ installation target into your project\'s \fBnode_modules\fR folder\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help developers +npm help 7 developers . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 npm help install . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "" 0 diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 0d8d853700..1584fb0f28 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-LS" "1" "July 2014" "" "" +.TH "NPM\-LS" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-ls\fR \-\- List installed packages @@ -29,7 +29,7 @@ For example, running \fBnpm ls promzard\fR in npm\'s source tree will show: .IP "" 4 . .nf -npm@1.4.23 /path/to/npm +npm@1.4.28 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 . @@ -119,13 +119,13 @@ Max display depth of the dependency tree\. npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help install diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index cb773bef55..7376fcd24a 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-OUTDATED" "1" "July 2014" "" "" +.TH "NPM\-OUTDATED" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-outdated\fR \-\- Check for outdated packages @@ -93,10 +93,10 @@ Max depth for checking dependency tree\. npm help update . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "" 0 diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index f1e0da1858..f204431e5d 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-OWNER" "1" "July 2014" "" "" +.TH "NPM\-OWNER" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-owner\fR \-\- Manage package owners @@ -46,13 +46,13 @@ that is not implemented at this time\. npm help publish . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help adduser . .IP "\(bu" 4 -npm help disputes +npm help 7 disputes . .IP "" 0 diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index 25e18cd19c..951d209adb 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-PACK" "1" "July 2014" "" "" +.TH "NPM\-PACK" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-pack\fR \-\- Create a tarball from a package @@ -39,10 +39,10 @@ npm help publish npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "" 0 diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index e865f52dbd..9cc3f7cadd 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-PREFIX" "1" "July 2014" "" "" +.TH "NPM\-PREFIX" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-prefix\fR \-\- Display prefix @@ -25,16 +25,16 @@ npm help root npm help bin . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "" 0 diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 6b40d3b9ea..71bb77c407 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-PRUNE" "1" "July 2014" "" "" +.TH "NPM\-PRUNE" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-prune\fR \-\- Remove extraneous packages @@ -33,7 +33,7 @@ packages specified in your \fBdevDependencies\fR\|\. npm help rm . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help ls diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index c9ed52a944..547ad64ed6 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-PUBLISH" "1" "July 2014" "" "" +.TH "NPM\-PUBLISH" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-publish\fR \-\- Publish a package @@ -41,12 +41,12 @@ the registry\. .P Once a package is published with a given name and version, that specific name and version combination can never be used again, even if -npm help it is removed with npm\-unpublish\. +it is removed with npm help unpublish\. . .SH "SEE ALSO" . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help adduser diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index a84ee3e50f..4130eb773f 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-REBUILD" "1" "July 2014" "" "" +.TH "NPM\-REBUILD" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-rebuild\fR \-\- Rebuild a package diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index 1c6d9b0ecb..557a3566ea 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-REPO" "1" "July 2014" "" "" +.TH "NPM\-REPO" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-repo\fR \-\- Open package repository page in the browser diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index 39acfc16d2..828a43f30f 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-RESTART" "1" "July 2014" "" "" +.TH "NPM\-RESTART" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-restart\fR \-\- Start a package @@ -27,7 +27,7 @@ If no version is specified, then it restarts the "active" version\. npm help run\-script . .IP "\(bu" 4 -npm help scripts +npm help 7 scripts . .IP "\(bu" 4 npm help test diff --git a/deps/npm/man/man1/npm-rm.1 b/deps/npm/man/man1/npm-rm.1 index e5eb6a461f..424314c7d5 100644 --- a/deps/npm/man/man1/npm-rm.1 +++ b/deps/npm/man/man1/npm-rm.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-RM" "1" "July 2014" "" "" +.TH "NPM\-RM" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-rm\fR \-\- Remove a package @@ -29,16 +29,16 @@ npm help prune npm help install . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "" 0 diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index 37cd884303..463eeaf934 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-ROOT" "1" "July 2014" "" "" +.TH "NPM\-ROOT" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-root\fR \-\- Display npm root @@ -25,16 +25,16 @@ npm help prefix npm help bin . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "" 0 diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index 1af3c977de..aa2740c119 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-RUN\-SCRIPT" "1" "July 2014" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-run-script\fR \-\- Run arbitrary package scripts @@ -27,7 +27,7 @@ called directly, as well\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help scripts +npm help 7 scripts . .IP "\(bu" 4 npm help test diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index 020d4602de..2c7edcd2ad 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-SEARCH" "1" "July 2014" "" "" +.TH "NPM\-SEARCH" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-search\fR \-\- Search for packages @@ -44,16 +44,16 @@ fall on multiple lines\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 npm help view diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index eac7fce7bb..2a053a5b0b 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-SHRINKWRAP" "1" "July 2014" "" "" +.TH "NPM\-SHRINKWRAP" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-shrinkwrap\fR \-\- Lock down dependency versions @@ -217,7 +217,7 @@ publish your package\. .IP "" 0 . .P -npm help You can use npm\-outdated to view dependencies with newer versions +You can use npm help outdated to view dependencies with newer versions available\. . .SS "Other Notes" @@ -256,7 +256,7 @@ contents rather than versions\. npm help install . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 npm help ls diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index 862f27669c..bbcfee19eb 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-STAR" "1" "July 2014" "" "" +.TH "NPM\-STAR" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-star\fR \-\- Mark your favorite packages diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index 6500130984..9b2d6d187e 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-STARS" "1" "July 2014" "" "" +.TH "NPM\-STARS" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-stars\fR \-\- View packages marked as favorites diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index 93b171fabe..c76e2c92a5 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-START" "1" "July 2014" "" "" +.TH "NPM\-START" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-start\fR \-\- Start a package @@ -22,7 +22,7 @@ This runs a package\'s "start" script, if one was provided\. npm help run\-script . .IP "\(bu" 4 -npm help scripts +npm help 7 scripts . .IP "\(bu" 4 npm help test diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index e54586901d..37c1a5fe03 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-STOP" "1" "July 2014" "" "" +.TH "NPM\-STOP" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-stop\fR \-\- Stop a package @@ -22,7 +22,7 @@ This runs a package\'s "stop" script, if one was provided\. npm help run\-script . .IP "\(bu" 4 -npm help scripts +npm help 7 scripts . .IP "\(bu" 4 npm help test diff --git a/deps/npm/man/man1/npm-submodule.1 b/deps/npm/man/man1/npm-submodule.1 index a10e4d3189..71853335c5 100644 --- a/deps/npm/man/man1/npm-submodule.1 +++ b/deps/npm/man/man1/npm-submodule.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-SUBMODULE" "1" "July 2014" "" "" +.TH "NPM\-SUBMODULE" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-submodule\fR \-\- Add a package as a git submodule @@ -33,7 +33,7 @@ dependencies into the submodule folder\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 git help submodule diff --git a/deps/npm/man/man1/npm-tag.1 b/deps/npm/man/man1/npm-tag.1 index e6c090eaa4..c1d463f8ce 100644 --- a/deps/npm/man/man1/npm-tag.1 +++ b/deps/npm/man/man1/npm-tag.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-TAG" "1" "July 2014" "" "" +.TH "NPM\-TAG" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-tag\fR \-\- Tag a published version @@ -59,16 +59,16 @@ npm help install npm help dedupe . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "" 0 diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index 5f2edc2fd8..063fc92679 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-TEST" "1" "July 2014" "" "" +.TH "NPM\-TEST" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-test\fR \-\- Test a package @@ -27,7 +27,7 @@ true\. npm help run\-script . .IP "\(bu" 4 -npm help scripts +npm help 7 scripts . .IP "\(bu" 4 npm help start diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 1a89621446..364d9c1d7c 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-RM" "1" "July 2014" "" "" +.TH "NPM\-RM" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-rm\fR \-\- Remove a package @@ -72,16 +72,16 @@ npm help prune npm help install . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "" 0 diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index eb7a5400ff..e5b8a65601 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-UNPUBLISH" "1" "July 2014" "" "" +.TH "NPM\-UNPUBLISH" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-unpublish\fR \-\- Remove a package from the registry @@ -46,7 +46,7 @@ npm help deprecate npm help publish . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help adduser diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 207eb053ac..de2201209f 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-UPDATE" "1" "July 2014" "" "" +.TH "NPM\-UPDATE" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-update\fR \-\- Update a package @@ -33,10 +33,10 @@ npm help install npm help outdated . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help ls diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index f9b8ac0c34..fc52da6e8f 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-VERSION" "1" "July 2014" "" "" +.TH "NPM\-VERSION" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-version\fR \-\- Bump a package version @@ -9,7 +9,7 @@ .SH "SYNOPSIS" . .nf -npm version [ | major | minor | patch] +npm version [ | major | minor | patch | premajor | preminor | prepatch | prerelease] . .fi . @@ -18,10 +18,10 @@ Run this in a package directory to bump the version and write the new data back to the package\.json file\. . .P -The \fBnewversion\fR argument should be a valid semver string, \fIor\fR a valid -second argument to semver\.inc (one of "patch", "minor", or -"major")\. In the second case, the existing version will be incremented -by 1 in the specified field\. +The \fBnewversion\fR argument should be a valid semver string, \fIor\fR a +valid second argument to semver\.inc (one of "patch", "minor", "major", +"prepatch", "preminor", "premajor", "prerelease")\. In the second case, +the existing version will be incremented by 1 in the specified field\. . .P If run in a git repo, it will also create a version commit and tag, and @@ -66,10 +66,10 @@ Enter passphrase: npm help init . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 -npm help semver +npm help 7 semver . .IP "" 0 diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 0a75f6518d..44b42b308d 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-VIEW" "1" "July 2014" "" "" +.TH "NPM\-VIEW" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-view\fR \-\- View registry info @@ -121,7 +121,7 @@ npm view express contributors\.name contributors\.email .P "Person" fields are shown as a string if they would be shown as an object\. So, for example, this will show the list of npm contributors in -the shortened string format\. (npm help See \fBpackage\.json\fR for more on this\.) +the shortened string format\. (See npm help 5 \fBpackage\.json\fR for more on this\.) . .IP "" 4 . @@ -168,16 +168,16 @@ the field name\. npm help search . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 npm help docs diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index e9b4c6aea9..bf43ae7eee 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-WHOAMI" "1" "July 2014" "" "" +.TH "NPM\-WHOAMI" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-whoami\fR \-\- Display npm username @@ -22,10 +22,10 @@ Print the \fBusername\fR config to standard output\. npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 npm help adduser diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 32800a2bb4..5a0f94c740 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM" "1" "July 2014" "" "" +.TH "NPM" "1" "September 2014" "" "" . .SH "NAME" \fBnpm\fR \-\- node package manager @@ -14,7 +14,7 @@ npm [args] .fi . .SH "VERSION" -1.4.23 +1.4.28 . .SH "DESCRIPTION" npm is the package manager for the Node JavaScript platform\. It puts @@ -33,7 +33,7 @@ Run \fBnpm help\fR to get a list of available commands\. You probably got npm because you want to install stuff\. . .P -npm help Use \fBnpm install blerg\fR to install the latest version of "blerg"\. Check out \fBnpm\-install\fR for more info\. It can do a lot of stuff\. +Use \fBnpm install blerg\fR to install the latest version of "blerg"\. Check out npm help \fBnpm\-install\fR for more info\. It can do a lot of stuff\. . .P Use the \fBnpm search\fR command to show everything that\'s available\. @@ -54,7 +54,7 @@ For more information visit the node\-gyp repository \fIhttps://github\.com/TooTa the node\-gyp Wiki \fIhttps://github\.com/TooTallNate/node\-gyp/wiki\fR\|\. . .SH "DIRECTORIES" -npm help See \fBnpm\-folders\fR to learn about where npm puts stuff\. +See npm help 5 \fBnpm\-folders\fR to learn about where npm puts stuff\. . .P In particular, npm has two modes of operation: @@ -84,7 +84,7 @@ following help topics: . .IP "\(bu" 4 json: -npm help Make a package\.json file\. See \fBpackage\.json\fR\|\. +Make a package\.json file\. See npm help 5 \fBpackage\.json\fR\|\. . .IP "\(bu" 4 link: @@ -153,14 +153,14 @@ lib/utils/config\-defs\.js\. These must not be changed\. .IP "" 0 . .P -npm help See \fBnpm\-config\fR for much much more information\. +See npm help 7 \fBnpm\-config\fR for much much more information\. . .SH "CONTRIBUTIONS" Patches welcome! . .IP "\(bu" 4 code: -npm help Read through \fBnpm\-coding\-style\fR if you plan to submit code\. +Read through npm help 7 \fBnpm\-coding\-style\fR if you plan to submit code\. You don\'t have to agree with it, but you do have to follow it\. . .IP "\(bu" 4 @@ -214,13 +214,13 @@ Isaac Z\. Schlueter \fIhttp://blog\.izs\.me/\fR :: isaacs \fIhttps://github\.com npm help help . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 README . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 npm help install @@ -229,13 +229,13 @@ npm help install npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 -npm help index +npm help 7 index . .IP "\(bu" 4 npm apihelp npm diff --git a/deps/npm/man/man3/npm-bin.3 b/deps/npm/man/man3/npm-bin.3 index 5c06c89426..97de75de85 100644 --- a/deps/npm/man/man3/npm-bin.3 +++ b/deps/npm/man/man3/npm-bin.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-BIN" "3" "July 2014" "" "" +.TH "NPM\-BIN" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-bin\fR \-\- Display npm bin folder diff --git a/deps/npm/man/man3/npm-bugs.3 b/deps/npm/man/man3/npm-bugs.3 index baf4f36e4b..bb85060afe 100644 --- a/deps/npm/man/man3/npm-bugs.3 +++ b/deps/npm/man/man3/npm-bugs.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-BUGS" "3" "July 2014" "" "" +.TH "NPM\-BUGS" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-bugs\fR \-\- Bugs for a package in a web browser maybe diff --git a/deps/npm/man/man3/npm-cache.3 b/deps/npm/man/man3/npm-cache.3 index 0ca985546a..b3396446ff 100644 --- a/deps/npm/man/man3/npm-cache.3 +++ b/deps/npm/man/man3/npm-cache.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-CACHE" "3" "July 2014" "" "" +.TH "NPM\-CACHE" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-cache\fR \-\- manage the npm cache programmatically @@ -18,7 +18,7 @@ npm\.commands\.cache\.read(name, version, forceBypass, callback) .fi . .SH "DESCRIPTION" -npm help This acts much the same ways as the npm\-cache command line +This acts much the same ways as the npm help cache command line functionality\. . .P diff --git a/deps/npm/man/man3/npm-commands.3 b/deps/npm/man/man3/npm-commands.3 index ae5c0f7cb1..003f5e5ab4 100644 --- a/deps/npm/man/man3/npm-commands.3 +++ b/deps/npm/man/man3/npm-commands.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-COMMANDS" "3" "July 2014" "" "" +.TH "NPM\-COMMANDS" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-commands\fR \-\- npm commands @@ -29,7 +29,7 @@ usage, or \fBman 3 npm\-\fR for programmatic usage\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help index +npm help 7 index . .IP "" 0 diff --git a/deps/npm/man/man3/npm-config.3 b/deps/npm/man/man3/npm-config.3 index cd42f86877..578b939a63 100644 --- a/deps/npm/man/man3/npm-config.3 +++ b/deps/npm/man/man3/npm-config.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-CONFIG" "3" "July 2014" "" "" +.TH "NPM\-CONFIG" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-config\fR \-\- Manage the npm configuration files diff --git a/deps/npm/man/man3/npm-deprecate.3 b/deps/npm/man/man3/npm-deprecate.3 index c3eb13a64c..29e4c34515 100644 --- a/deps/npm/man/man3/npm-deprecate.3 +++ b/deps/npm/man/man3/npm-deprecate.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-DEPRECATE" "3" "July 2014" "" "" +.TH "NPM\-DEPRECATE" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-deprecate\fR \-\- Deprecate a version of a package @@ -51,7 +51,7 @@ npm apihelp publish npm apihelp unpublish . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "" 0 diff --git a/deps/npm/man/man3/npm-docs.3 b/deps/npm/man/man3/npm-docs.3 index 49a81e92eb..e3039c2ef5 100644 --- a/deps/npm/man/man3/npm-docs.3 +++ b/deps/npm/man/man3/npm-docs.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-DOCS" "3" "July 2014" "" "" +.TH "NPM\-DOCS" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-docs\fR \-\- Docs for a package in a web browser maybe diff --git a/deps/npm/man/man3/npm-edit.3 b/deps/npm/man/man3/npm-edit.3 index a33489e628..bcdabb6f23 100644 --- a/deps/npm/man/man3/npm-edit.3 +++ b/deps/npm/man/man3/npm-edit.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-EDIT" "3" "July 2014" "" "" +.TH "NPM\-EDIT" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-edit\fR \-\- Edit an installed package diff --git a/deps/npm/man/man3/npm-explore.3 b/deps/npm/man/man3/npm-explore.3 index 08fdd6113c..0918dae972 100644 --- a/deps/npm/man/man3/npm-explore.3 +++ b/deps/npm/man/man3/npm-explore.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-EXPLORE" "3" "July 2014" "" "" +.TH "NPM\-EXPLORE" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-explore\fR \-\- Browse an installed package diff --git a/deps/npm/man/man3/npm-help-search.3 b/deps/npm/man/man3/npm-help-search.3 index f70ffd1e8e..2c39f5c7b4 100644 --- a/deps/npm/man/man3/npm-help-search.3 +++ b/deps/npm/man/man3/npm-help-search.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-HELP\-SEARCH" "3" "July 2014" "" "" +.TH "NPM\-HELP\-SEARCH" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-help-search\fR \-\- Search the help pages diff --git a/deps/npm/man/man3/npm-init.3 b/deps/npm/man/man3/npm-init.3 index a6806ad548..d4eba22052 100644 --- a/deps/npm/man/man3/npm-init.3 +++ b/deps/npm/man/man3/npm-init.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "INIT" "3" "July 2014" "" "" +.TH "INIT" "3" "September 2014" "" "" . .SH "NAME" \fBinit\fR \-\- Interactively create a package\.json file @@ -36,4 +36,4 @@ preferred method\. If you\'re sure you want to handle command\-line prompting, then go ahead and use this programmatically\. . .SH "SEE ALSO" -npm help package\.json +npm help 5 package\.json diff --git a/deps/npm/man/man3/npm-install.3 b/deps/npm/man/man3/npm-install.3 index 3f0657bfae..4b09fbe80f 100644 --- a/deps/npm/man/man3/npm-install.3 +++ b/deps/npm/man/man3/npm-install.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-INSTALL" "3" "July 2014" "" "" +.TH "NPM\-INSTALL" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-install\fR \-\- install a package programmatically diff --git a/deps/npm/man/man3/npm-link.3 b/deps/npm/man/man3/npm-link.3 index 022339c716..dbecc0edb7 100644 --- a/deps/npm/man/man3/npm-link.3 +++ b/deps/npm/man/man3/npm-link.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-LINK" "3" "July 2014" "" "" +.TH "NPM\-LINK" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-link\fR \-\- Symlink a package folder diff --git a/deps/npm/man/man3/npm-load.3 b/deps/npm/man/man3/npm-load.3 index 18c155f6c1..4180127d7e 100644 --- a/deps/npm/man/man3/npm-load.3 +++ b/deps/npm/man/man3/npm-load.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-LOAD" "3" "July 2014" "" "" +.TH "NPM\-LOAD" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-load\fR \-\- Load config settings diff --git a/deps/npm/man/man3/npm-ls.3 b/deps/npm/man/man3/npm-ls.3 index 58bf72b6f5..723e2bc45b 100644 --- a/deps/npm/man/man3/npm-ls.3 +++ b/deps/npm/man/man3/npm-ls.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-LS" "3" "July 2014" "" "" +.TH "NPM\-LS" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-ls\fR \-\- List installed packages diff --git a/deps/npm/man/man3/npm-outdated.3 b/deps/npm/man/man3/npm-outdated.3 index 8af78d813b..3da841dc3d 100644 --- a/deps/npm/man/man3/npm-outdated.3 +++ b/deps/npm/man/man3/npm-outdated.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-OUTDATED" "3" "July 2014" "" "" +.TH "NPM\-OUTDATED" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-outdated\fR \-\- Check for outdated packages diff --git a/deps/npm/man/man3/npm-owner.3 b/deps/npm/man/man3/npm-owner.3 index 383c156729..38cc42d699 100644 --- a/deps/npm/man/man3/npm-owner.3 +++ b/deps/npm/man/man3/npm-owner.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-OWNER" "3" "July 2014" "" "" +.TH "NPM\-OWNER" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-owner\fR \-\- Manage package owners @@ -46,7 +46,7 @@ that is not implemented at this time\. npm apihelp publish . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "" 0 diff --git a/deps/npm/man/man3/npm-pack.3 b/deps/npm/man/man3/npm-pack.3 index dc22e3aa21..a7ccab0a73 100644 --- a/deps/npm/man/man3/npm-pack.3 +++ b/deps/npm/man/man3/npm-pack.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-PACK" "3" "July 2014" "" "" +.TH "NPM\-PACK" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-pack\fR \-\- Create a tarball from a package diff --git a/deps/npm/man/man3/npm-prefix.3 b/deps/npm/man/man3/npm-prefix.3 index 0e28759755..3e80055657 100644 --- a/deps/npm/man/man3/npm-prefix.3 +++ b/deps/npm/man/man3/npm-prefix.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-PREFIX" "3" "July 2014" "" "" +.TH "NPM\-PREFIX" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-prefix\fR \-\- Display prefix diff --git a/deps/npm/man/man3/npm-prune.3 b/deps/npm/man/man3/npm-prune.3 index 473486c696..f9aff4ad32 100644 --- a/deps/npm/man/man3/npm-prune.3 +++ b/deps/npm/man/man3/npm-prune.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-PRUNE" "3" "July 2014" "" "" +.TH "NPM\-PRUNE" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-prune\fR \-\- Remove extraneous packages diff --git a/deps/npm/man/man3/npm-publish.3 b/deps/npm/man/man3/npm-publish.3 index 04744f8624..842da1bb80 100644 --- a/deps/npm/man/man3/npm-publish.3 +++ b/deps/npm/man/man3/npm-publish.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-PUBLISH" "3" "July 2014" "" "" +.TH "NPM\-PUBLISH" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-publish\fR \-\- Publish a package @@ -39,7 +39,7 @@ the registry\. Overwrites when the "force" environment variable is set\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help adduser diff --git a/deps/npm/man/man3/npm-rebuild.3 b/deps/npm/man/man3/npm-rebuild.3 index 169f6d7174..f6233c2f29 100644 --- a/deps/npm/man/man3/npm-rebuild.3 +++ b/deps/npm/man/man3/npm-rebuild.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-REBUILD" "3" "July 2014" "" "" +.TH "NPM\-REBUILD" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-rebuild\fR \-\- Rebuild a package diff --git a/deps/npm/man/man3/npm-repo.3 b/deps/npm/man/man3/npm-repo.3 index e1600a6a61..06db0d50a2 100644 --- a/deps/npm/man/man3/npm-repo.3 +++ b/deps/npm/man/man3/npm-repo.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-REPO" "3" "July 2014" "" "" +.TH "NPM\-REPO" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-repo\fR \-\- Open package repository page in the browser diff --git a/deps/npm/man/man3/npm-restart.3 b/deps/npm/man/man3/npm-restart.3 index a61ed86991..5c0ed9ca0e 100644 --- a/deps/npm/man/man3/npm-restart.3 +++ b/deps/npm/man/man3/npm-restart.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-RESTART" "3" "July 2014" "" "" +.TH "NPM\-RESTART" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-restart\fR \-\- Start a package diff --git a/deps/npm/man/man3/npm-root.3 b/deps/npm/man/man3/npm-root.3 index 47872d9f79..5772cb40d3 100644 --- a/deps/npm/man/man3/npm-root.3 +++ b/deps/npm/man/man3/npm-root.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-ROOT" "3" "July 2014" "" "" +.TH "NPM\-ROOT" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-root\fR \-\- Display npm root diff --git a/deps/npm/man/man3/npm-run-script.3 b/deps/npm/man/man3/npm-run-script.3 index a48f330667..5c5d435a30 100644 --- a/deps/npm/man/man3/npm-run-script.3 +++ b/deps/npm/man/man3/npm-run-script.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-RUN\-SCRIPT" "3" "July 2014" "" "" +.TH "NPM\-RUN\-SCRIPT" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-run-script\fR \-\- Run arbitrary package scripts @@ -30,7 +30,7 @@ assumed to be the command to run\. All other elements are ignored\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help scripts +npm help 7 scripts . .IP "\(bu" 4 npm apihelp test diff --git a/deps/npm/man/man3/npm-search.3 b/deps/npm/man/man3/npm-search.3 index 06e49bfd11..f7692a637c 100644 --- a/deps/npm/man/man3/npm-search.3 +++ b/deps/npm/man/man3/npm-search.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-SEARCH" "3" "July 2014" "" "" +.TH "NPM\-SEARCH" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-search\fR \-\- Search for packages diff --git a/deps/npm/man/man3/npm-shrinkwrap.3 b/deps/npm/man/man3/npm-shrinkwrap.3 index 8082527993..e5cdb59d9c 100644 --- a/deps/npm/man/man3/npm-shrinkwrap.3 +++ b/deps/npm/man/man3/npm-shrinkwrap.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-SHRINKWRAP" "3" "July 2014" "" "" +.TH "NPM\-SHRINKWRAP" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-shrinkwrap\fR \-\- programmatically generate package shrinkwrap file diff --git a/deps/npm/man/man3/npm-start.3 b/deps/npm/man/man3/npm-start.3 index 259f3189ff..6e2cb64771 100644 --- a/deps/npm/man/man3/npm-start.3 +++ b/deps/npm/man/man3/npm-start.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-START" "3" "July 2014" "" "" +.TH "NPM\-START" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-start\fR \-\- Start a package diff --git a/deps/npm/man/man3/npm-stop.3 b/deps/npm/man/man3/npm-stop.3 index 875b2537a9..b1f4ee7503 100644 --- a/deps/npm/man/man3/npm-stop.3 +++ b/deps/npm/man/man3/npm-stop.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-STOP" "3" "July 2014" "" "" +.TH "NPM\-STOP" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-stop\fR \-\- Stop a package diff --git a/deps/npm/man/man3/npm-submodule.3 b/deps/npm/man/man3/npm-submodule.3 index e50d928b1d..95739ce3b0 100644 --- a/deps/npm/man/man3/npm-submodule.3 +++ b/deps/npm/man/man3/npm-submodule.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-SUBMODULE" "3" "July 2014" "" "" +.TH "NPM\-SUBMODULE" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-submodule\fR \-\- Add a package as a git submodule diff --git a/deps/npm/man/man3/npm-tag.3 b/deps/npm/man/man3/npm-tag.3 index 0e4a5e9138..fe00dbcc2e 100644 --- a/deps/npm/man/man3/npm-tag.3 +++ b/deps/npm/man/man3/npm-tag.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-TAG" "3" "July 2014" "" "" +.TH "NPM\-TAG" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-tag\fR \-\- Tag a published version diff --git a/deps/npm/man/man3/npm-test.3 b/deps/npm/man/man3/npm-test.3 index 66ebe38aa9..86aa780ac1 100644 --- a/deps/npm/man/man3/npm-test.3 +++ b/deps/npm/man/man3/npm-test.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-TEST" "3" "July 2014" "" "" +.TH "NPM\-TEST" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-test\fR \-\- Test a package diff --git a/deps/npm/man/man3/npm-uninstall.3 b/deps/npm/man/man3/npm-uninstall.3 index c14627d575..7ae1368423 100644 --- a/deps/npm/man/man3/npm-uninstall.3 +++ b/deps/npm/man/man3/npm-uninstall.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-UNINSTALL" "3" "July 2014" "" "" +.TH "NPM\-UNINSTALL" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-uninstall\fR \-\- uninstall a package programmatically diff --git a/deps/npm/man/man3/npm-unpublish.3 b/deps/npm/man/man3/npm-unpublish.3 index f29c89aaf6..63be8506ee 100644 --- a/deps/npm/man/man3/npm-unpublish.3 +++ b/deps/npm/man/man3/npm-unpublish.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-UNPUBLISH" "3" "July 2014" "" "" +.TH "NPM\-UNPUBLISH" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-unpublish\fR \-\- Remove a package from the registry diff --git a/deps/npm/man/man3/npm-update.3 b/deps/npm/man/man3/npm-update.3 index 8dc8ab9bf2..740038b419 100644 --- a/deps/npm/man/man3/npm-update.3 +++ b/deps/npm/man/man3/npm-update.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-UPDATE" "3" "July 2014" "" "" +.TH "NPM\-UPDATE" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-update\fR \-\- Update a package diff --git a/deps/npm/man/man3/npm-version.3 b/deps/npm/man/man3/npm-version.3 index c20eba65a9..2c79f3782f 100644 --- a/deps/npm/man/man3/npm-version.3 +++ b/deps/npm/man/man3/npm-version.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-VERSION" "3" "July 2014" "" "" +.TH "NPM\-VERSION" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-version\fR \-\- Bump a package version diff --git a/deps/npm/man/man3/npm-view.3 b/deps/npm/man/man3/npm-view.3 index b03b11b530..3e91ce6716 100644 --- a/deps/npm/man/man3/npm-view.3 +++ b/deps/npm/man/man3/npm-view.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-VIEW" "3" "July 2014" "" "" +.TH "NPM\-VIEW" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-view\fR \-\- View registry info diff --git a/deps/npm/man/man3/npm-whoami.3 b/deps/npm/man/man3/npm-whoami.3 index b27069da57..1a0a43cf51 100644 --- a/deps/npm/man/man3/npm-whoami.3 +++ b/deps/npm/man/man3/npm-whoami.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-WHOAMI" "3" "July 2014" "" "" +.TH "NPM\-WHOAMI" "3" "September 2014" "" "" . .SH "NAME" \fBnpm-whoami\fR \-\- Display npm username diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index 5509d0ed4c..e762dc4851 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM" "3" "July 2014" "" "" +.TH "NPM" "3" "September 2014" "" "" . .SH "NAME" \fBnpm\fR \-\- node package manager @@ -21,12 +21,12 @@ npm\.load([configObject, ]function (er, npm) { .fi . .SH "VERSION" -1.4.23 +1.4.28 . .SH "DESCRIPTION" This is the API documentation for npm\. To find documentation of the command line -npm help client, see \fBnpm\fR\|\. +client, see npm help \fBnpm\fR\|\. . .P Prior to using npm\'s commands, \fBnpm\.load()\fR must be called\. @@ -34,11 +34,11 @@ If you provide \fBconfigObject\fR as an object hash of top\-level configs, they override the values stored in the various config locations\. In the npm command line client, this set of configs is parsed from the command line options\. Additional configuration -npm help npm help params are loaded from two configuration files\. See \fBnpm\-config\fR, \fBnpm\-confignpm help \fR, and \fBnpmrc\fR for more information\. +params are loaded from two configuration files\. See npm help \fBnpm\-config\fR, npm help 7 \fBnpm\-config\fR, and npm help 5 \fBnpmrc\fR for more information\. . .P After that, each of the functions are accessible in the -npm help commands object: \fBnpm\.commands\.\fR\|\. See \fBnpm\-index\fR for a list of +commands object: \fBnpm\.commands\.\fR\|\. See npm help 7 \fBnpm\-index\fR for a list of all possible commands\. . .P diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index 8e9772078f..d349c1f43a 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-FOLDERS" "5" "July 2014" "" "" +.TH "NPM\-FOLDERS" "5" "September 2014" "" "" . .SH "NAME" \fBnpm-folders\fR \-\- Folder Structures Used by npm @@ -77,7 +77,7 @@ When in local mode, man pages are not installed\. Man pages are not installed on Windows systems\. . .SS "Cache" -npm help See \fBnpm\-cache\fR\|\. Cache files are stored in \fB~/\.npm\fR on Posix, or \fB~/npm\-cache\fR on Windows\. +See npm help \fBnpm\-cache\fR\|\. Cache files are stored in \fB~/\.npm\fR on Posix, or \fB~/npm\-cache\fR on Windows\. . .P This is controlled by the \fBcache\fR configuration param\. @@ -229,15 +229,15 @@ not be included in the package tarball\. .P This allows a package maintainer to install all of their dependencies (and dev dependencies) locally, but only re\-publish those items that -npm help cannot be found elsewhere\. See \fBpackage\.json\fR for more information\. +cannot be found elsewhere\. See npm help 5 \fBpackage\.json\fR for more information\. . .SH "SEE ALSO" . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 npm help install @@ -252,10 +252,10 @@ npm help cache npm help config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 npm help publish diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index 8e9772078f..d349c1f43a 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-FOLDERS" "5" "July 2014" "" "" +.TH "NPM\-FOLDERS" "5" "September 2014" "" "" . .SH "NAME" \fBnpm-folders\fR \-\- Folder Structures Used by npm @@ -77,7 +77,7 @@ When in local mode, man pages are not installed\. Man pages are not installed on Windows systems\. . .SS "Cache" -npm help See \fBnpm\-cache\fR\|\. Cache files are stored in \fB~/\.npm\fR on Posix, or \fB~/npm\-cache\fR on Windows\. +See npm help \fBnpm\-cache\fR\|\. Cache files are stored in \fB~/\.npm\fR on Posix, or \fB~/npm\-cache\fR on Windows\. . .P This is controlled by the \fBcache\fR configuration param\. @@ -229,15 +229,15 @@ not be included in the package tarball\. .P This allows a package maintainer to install all of their dependencies (and dev dependencies) locally, but only re\-publish those items that -npm help cannot be found elsewhere\. See \fBpackage\.json\fR for more information\. +cannot be found elsewhere\. See npm help 5 \fBpackage\.json\fR for more information\. . .SH "SEE ALSO" . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 npm help install @@ -252,10 +252,10 @@ npm help cache npm help config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 npm help publish diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index 5182d29a70..8233dc1731 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "PACKAGE\.JSON" "5" "July 2014" "" "" +.TH "PACKAGE\.JSON" "5" "September 2014" "" "" . .SH "NAME" \fBpackage.json\fR \-\- Specifics of npm\'s package\.json handling @@ -12,7 +12,7 @@ file\. It must be actual JSON, not just a JavaScript object literal\. . .P A lot of the behavior described in this document is affected by the config -npm help settings described in \fBnpm\-config\fR\|\. +settings described in npm help 7 \fBnpm\-config\fR\|\. . .SH "name" The \fImost\fR important things in your package\.json are the name and version fields\. @@ -56,7 +56,7 @@ Version must be parseable by node\-semver \fIhttps://github\.com/isaacs/node\-se with npm as a dependency\. (\fBnpm install semver\fR to use it yourself\.) . .P -npm help More on version numbers and ranges at semver\. +More on version numbers and ranges at npm help 7 semver\. . .SH "description" Put a description in it\. It\'s a string\. This helps people discover your @@ -371,7 +371,7 @@ at various times in the lifecycle of your package\. The key is the lifecycle event, and the value is the command to run at that point\. . .P -npm help See \fBnpm\-scripts\fR to find out more about writing package scripts\. +See npm help 7 \fBnpm\-scripts\fR to find out more about writing package scripts\. . .SH "config" A "config" hash can be used to set configuration @@ -393,7 +393,7 @@ and then had a "start" command that then referenced the \fBnpm_package_config_po override that by doing \fBnpm config set foo:port 8001\fR\|\. . .P -npm help See \fBnpm\-confignpm help \fR and \fBnpm\-scripts\fR for more on package +See npm help 7 \fBnpm\-config\fR and npm help 7 \fBnpm\-scripts\fR for more on package configs\. . .SH "dependencies" @@ -406,7 +406,7 @@ a tarball or git URL\. \fBPlease do not put test harnesses or transpilers in your \fBdependencies\fR hash\.\fR See \fBdevDependencies\fR, below\. . .P -npm help See semver for more details about specifying version ranges\. +See npm help 7 semver for more details about specifying version ranges\. . .IP "\(bu" 4 \fBversion\fR Must match \fBversion\fR exactly @@ -424,10 +424,10 @@ npm help See semver for more details about specifying version ranges\. \fB<=version\fR . .IP "\(bu" 4 -npm help \fB~version\fR "Approximately equivalent to version" See semver +\fB~version\fR "Approximately equivalent to version" See npm help 7 semver . .IP "\(bu" 4 -npm help \fB^version\fR "Compatible with version" See semver +\fB^version\fR "Compatible with version" See npm help 7 semver . .IP "\(bu" 4 \fB1\.2\.x\fR 1\.2\.0, 1\.2\.1, etc\., but not 1\.3\.0 @@ -535,7 +535,7 @@ In this case, it\'s best to list these additional items in a \fBdevDependencies\ .P These things will be installed when doing \fBnpm link\fR or \fBnpm install\fR from the root of a package, and can be managed like any other npm -npm help configuration param\. See \fBnpm\-config\fR for more on the topic\. +configuration param\. See npm help 7 \fBnpm\-config\fR for more on the topic\. . .P For build steps that are not platform\-specific, such as compiling @@ -804,7 +804,7 @@ Any config values can be overridden, but of course only "tag" and "registry" probably matter for the purposes of publishing\. . .P -npm help See \fBnpm\-config\fR to see the list of config options that can be +See npm help 7 \fBnpm\-config\fR to see the list of config options that can be overridden\. . .SH "DEFAULT VALUES" @@ -838,7 +838,7 @@ ignored\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help semver +npm help 7 semver . .IP "\(bu" 4 npm help init @@ -850,13 +850,13 @@ npm help version npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 npm help help . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 npm help install diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index bf7f9be409..d0b6323657 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPMRC" "5" "July 2014" "" "" +.TH "NPMRC" "5" "September 2014" "" "" . .SH "NAME" \fBnpmrc\fR \-\- The npm config files @@ -15,7 +15,7 @@ The \fBnpm config\fR command can be used to update and edit the contents of the user and global npmrc files\. . .P -npm help For a list of available configuration options, see npm\-config\. +For a list of available configuration options, see npm help 7 config\. . .SH "FILES" The four relevant files are: @@ -85,16 +85,16 @@ manner\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 npm help npm diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index 5182d29a70..8233dc1731 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "PACKAGE\.JSON" "5" "July 2014" "" "" +.TH "PACKAGE\.JSON" "5" "September 2014" "" "" . .SH "NAME" \fBpackage.json\fR \-\- Specifics of npm\'s package\.json handling @@ -12,7 +12,7 @@ file\. It must be actual JSON, not just a JavaScript object literal\. . .P A lot of the behavior described in this document is affected by the config -npm help settings described in \fBnpm\-config\fR\|\. +settings described in npm help 7 \fBnpm\-config\fR\|\. . .SH "name" The \fImost\fR important things in your package\.json are the name and version fields\. @@ -56,7 +56,7 @@ Version must be parseable by node\-semver \fIhttps://github\.com/isaacs/node\-se with npm as a dependency\. (\fBnpm install semver\fR to use it yourself\.) . .P -npm help More on version numbers and ranges at semver\. +More on version numbers and ranges at npm help 7 semver\. . .SH "description" Put a description in it\. It\'s a string\. This helps people discover your @@ -371,7 +371,7 @@ at various times in the lifecycle of your package\. The key is the lifecycle event, and the value is the command to run at that point\. . .P -npm help See \fBnpm\-scripts\fR to find out more about writing package scripts\. +See npm help 7 \fBnpm\-scripts\fR to find out more about writing package scripts\. . .SH "config" A "config" hash can be used to set configuration @@ -393,7 +393,7 @@ and then had a "start" command that then referenced the \fBnpm_package_config_po override that by doing \fBnpm config set foo:port 8001\fR\|\. . .P -npm help See \fBnpm\-confignpm help \fR and \fBnpm\-scripts\fR for more on package +See npm help 7 \fBnpm\-config\fR and npm help 7 \fBnpm\-scripts\fR for more on package configs\. . .SH "dependencies" @@ -406,7 +406,7 @@ a tarball or git URL\. \fBPlease do not put test harnesses or transpilers in your \fBdependencies\fR hash\.\fR See \fBdevDependencies\fR, below\. . .P -npm help See semver for more details about specifying version ranges\. +See npm help 7 semver for more details about specifying version ranges\. . .IP "\(bu" 4 \fBversion\fR Must match \fBversion\fR exactly @@ -424,10 +424,10 @@ npm help See semver for more details about specifying version ranges\. \fB<=version\fR . .IP "\(bu" 4 -npm help \fB~version\fR "Approximately equivalent to version" See semver +\fB~version\fR "Approximately equivalent to version" See npm help 7 semver . .IP "\(bu" 4 -npm help \fB^version\fR "Compatible with version" See semver +\fB^version\fR "Compatible with version" See npm help 7 semver . .IP "\(bu" 4 \fB1\.2\.x\fR 1\.2\.0, 1\.2\.1, etc\., but not 1\.3\.0 @@ -535,7 +535,7 @@ In this case, it\'s best to list these additional items in a \fBdevDependencies\ .P These things will be installed when doing \fBnpm link\fR or \fBnpm install\fR from the root of a package, and can be managed like any other npm -npm help configuration param\. See \fBnpm\-config\fR for more on the topic\. +configuration param\. See npm help 7 \fBnpm\-config\fR for more on the topic\. . .P For build steps that are not platform\-specific, such as compiling @@ -804,7 +804,7 @@ Any config values can be overridden, but of course only "tag" and "registry" probably matter for the purposes of publishing\. . .P -npm help See \fBnpm\-config\fR to see the list of config options that can be +See npm help 7 \fBnpm\-config\fR to see the list of config options that can be overridden\. . .SH "DEFAULT VALUES" @@ -838,7 +838,7 @@ ignored\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help semver +npm help 7 semver . .IP "\(bu" 4 npm help init @@ -850,13 +850,13 @@ npm help version npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 npm help help . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 npm help install diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index c7dee81d11..385a390872 100644 --- a/deps/npm/man/man7/npm-coding-style.7 +++ b/deps/npm/man/man7/npm-coding-style.7 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-CODING\-STYLE" "7" "July 2014" "" "" +.TH "NPM\-CODING\-STYLE" "7" "September 2014" "" "" . .SH "NAME" \fBnpm-coding-style\fR \-\- npm\'s "funny" coding style @@ -201,7 +201,7 @@ report what\'s happening so that it\'s easier to track down where a fault occurs\. . .P -npm help Use appropriate log levels\. See \fBnpm\-config\fR and search for +Use appropriate log levels\. See npm help 7 \fBnpm\-config\fR and search for "loglevel"\. . .SH "Case, naming, etc\." @@ -242,10 +242,10 @@ Boolean objects are verboten\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help developers +npm help 7 developers . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 npm help npm diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index 807e04d952..7bdf1c0059 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-CONFIG" "7" "July 2014" "" "" +.TH "NPM\-CONFIG" "7" "September 2014" "" "" . .SH "NAME" \fBnpm-config\fR \-\- More than you probably want to know about npm configuration @@ -41,7 +41,7 @@ npm builtin config file (/path/to/npm/npmrc) .IP "" 0 . .P -npm help See npmrc for more details\. +See npm help 5 npmrc for more details\. . .SS "Default Configs" A set of configuration parameters that are internal to npm, and are @@ -155,7 +155,7 @@ npm ls \-\-global \-\-parseable \-\-long \-\-loglevel info .IP "" 0 . .SH "Per\-Package Config Settings" -When running scripts (npm help see \fBnpm\-scripts\fR) the package\.json "config" +When running scripts (see npm help 7 \fBnpm\-scripts\fR) the package\.json "config" keys are overwritten in the environment if there is a config param of \fB[@]:\fR\|\. For example, if the package\.json has this: . @@ -195,7 +195,7 @@ npm config set foo:port 80 .IP "" 0 . .P -npm help See package\.json for more information\. +See npm help 5 package\.json for more information\. . .SH "Config Settings" . @@ -292,7 +292,7 @@ Type: path .IP "" 0 . .P -npm help The location of npm\'s cache directory\. See \fBnpm\-cache\fR +The location of npm\'s cache directory\. See npm help \fBnpm\-cache\fR . .SS "cache\-lock\-stale" . @@ -596,7 +596,7 @@ Type: Boolean .IP "" 0 . .P -npm help Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory\. See \fBnpm\-folders\fR for more on the differences in behavior\. +Operates in "global" mode, so that packages are installed into the \fBprefix\fR folder instead of the current working directory\. See npm help 5 \fBnpm\-folders\fR for more on the differences in behavior\. . .IP "\(bu" 4 packages are installed into the \fB{prefix}/lib/node_modules\fR folder, instead of the @@ -689,7 +689,7 @@ Type: path .P A module that will be loaded by the \fBnpm init\fR command\. See the documentation for the init\-package\-json \fIhttps://github\.com/isaacs/init\-package\-json\fR module -npm help for more information, or npm\-init\. +for more information, or npm help init\. . .SS "init\.author\.name" . @@ -959,7 +959,7 @@ standard output\. .SS "prefix" . .IP "\(bu" 4 -npm help Default: see npm\-folders +Default: see npm help 5 folders . .IP "\(bu" 4 Type: path @@ -1374,7 +1374,7 @@ Type: Boolean . .P Set to show short usage output (like the \-H output) -npm help instead of complete help when doing \fBnpm\-help\fR\|\. +instead of complete help when doing npm help \fBnpm\-help\fR\|\. . .SS "user" . @@ -1502,16 +1502,16 @@ Set to \fB"browser"\fR to view html help content in the default web browser\. npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 -npm help scripts +npm help 7 scripts . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "\(bu" 4 npm help npm diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7 index 01bebd8cba..071b8c2d79 100644 --- a/deps/npm/man/man7/npm-developers.7 +++ b/deps/npm/man/man7/npm-developers.7 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-DEVELOPERS" "7" "July 2014" "" "" +.TH "NPM\-DEVELOPERS" "7" "September 2014" "" "" . .SH "NAME" \fBnpm-developers\fR \-\- Developer Guide @@ -78,7 +78,7 @@ You need to have a \fBpackage\.json\fR file in the root of your project to do much of anything with npm\. That is basically the whole interface\. . .P -npm help See \fBpackage\.json\fR for details about what goes in that file\. At the very +See npm help 5 \fBpackage\.json\fR for details about what goes in that file\. At the very least, you need: . .IP "\(bu" 4 @@ -114,7 +114,7 @@ scripts: If you have a special compilation or installation script, then you should put it in the \fBscripts\fR hash\. You should definitely have at least a basic smoke\-test command as the "scripts\.test" field\. -npm help See npm\-scripts\. +See npm help 7 scripts\. . .IP "\(bu" 4 main: @@ -132,7 +132,7 @@ they\'ll get installed just like these ones\. . .P You can use \fBnpm init\fR in the root of your package in order to get you -npm help started with a pretty basic package\.json file\. See \fBnpm\-init\fR for +started with a pretty basic package\.json file\. See npm help \fBnpm\-init\fR for more info\. . .SH "Keeping files " @@ -201,7 +201,7 @@ need to either re\-link or \fBnpm rebuild \-g\fR to update compiled packages, of course\.) . .P -npm help More info at \fBnpm\-link\fR\|\. +More info at npm help \fBnpm\-link\fR\|\. . .SH "Before Publishing: Make Sure Your Package Installs and Works" \fBThis is important\.\fR @@ -276,7 +276,7 @@ npm adduser and then follow the prompts\. . .P -npm help This is documented better in npm\-adduser\. +This is documented better in npm help adduser\. . .SH "Publish your package" This part\'s easy\. IN the root of your folder, do this: @@ -308,7 +308,7 @@ Tell the world how easy it is to install your program! .SH "SEE ALSO" . .IP "\(bu" 4 -npm help faq +npm help 7 faq . .IP "\(bu" 4 npm help npm @@ -317,10 +317,10 @@ npm help npm npm help init . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 -npm help scripts +npm help 7 scripts . .IP "\(bu" 4 npm help publish @@ -329,7 +329,7 @@ npm help publish npm help adduser . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "" 0 diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7 index f5de204d98..a3163bcaec 100644 --- a/deps/npm/man/man7/npm-disputes.7 +++ b/deps/npm/man/man7/npm-disputes.7 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-DISPUTES" "7" "July 2014" "" "" +.TH "NPM\-DISPUTES" "7" "September 2014" "" "" . .SH "NAME" \fBnpm-disputes\fR \-\- Handling Module Name Disputes @@ -137,7 +137,7 @@ If you see bad behavior like this, please report it right away\. .SH "SEE ALSO" . .IP "\(bu" 4 -npm help registry +npm help 7 registry . .IP "\(bu" 4 npm help owner diff --git a/deps/npm/man/man7/npm-faq.7 b/deps/npm/man/man7/npm-faq.7 index c66d7e9de8..5eefee8d06 100644 --- a/deps/npm/man/man7/npm-faq.7 +++ b/deps/npm/man/man7/npm-faq.7 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-FAQ" "7" "July 2014" "" "" +.TH "NPM\-FAQ" "7" "September 2014" "" "" . .SH "NAME" \fBnpm-faq\fR \-\- Frequently Asked Questions @@ -32,7 +32,7 @@ Read the error output, and if you can\'t figure out what it means, do what it says and post a bug with all the information it asks for\. . .SH "Where does npm put stuff?" -npm help See \fBnpm\-folders\fR +See npm help 5 \fBnpm\-folders\fR . .P tl;dr: @@ -74,7 +74,7 @@ problems than it solves\. .P It is much harder to avoid dependency conflicts without nesting dependencies\. This is fundamental to the way that npm works, and has -npm help proven to be an extremely successful approach\. See \fBnpm\-folders\fR for +proven to be an extremely successful approach\. See npm help 5 \fBnpm\-folders\fR for more details\. . .P @@ -379,14 +379,14 @@ Windows: .IP "" 0 . .SH "How can I use npm for development?" -npm help See \fBnpm\-developersnpm help \fR and \fBpackage\.json\fR\|\. +See npm help 7 \fBnpm\-developers\fR and npm help 5 \fBpackage\.json\fR\|\. . .P You\'ll most likely want to \fBnpm link\fR your development folder\. That\'s awesomely handy\. . .P -npm help To set up your own private registry, check out \fBnpm\-registry\fR\|\. +To set up your own private registry, check out npm help 7 \fBnpm\-registry\fR\|\. . .SH "Can I list a url as a dependency?" Yes\. It should be a url to a gzipped tarball containing a single folder @@ -394,10 +394,10 @@ that has a package\.json in its root, or a git url\. (See "what is a package?" above\.) . .SH "How do I symlink to a dev folder so I don't have to keep re\-installing?" -npm help See \fBnpm\-link\fR +See npm help \fBnpm\-link\fR . .SH "The package registry website\. What is that exactly?" -npm help See \fBnpm\-registry\fR\|\. +See npm help 7 \fBnpm\-registry\fR\|\. . .SH "I forgot my password, and can't publish\. How do I reset it?" Go to \fIhttps://npmjs\.org/forgot\fR\|\. @@ -455,25 +455,25 @@ npm is not capable of hatred\. It loves everyone, especially you\. npm help npm . .IP "\(bu" 4 -npm help developers +npm help 7 developers . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help folders +npm help 5 folders . .IP "" 0 diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7 index a17389127f..763b3dd3e5 100644 --- a/deps/npm/man/man7/npm-index.7 +++ b/deps/npm/man/man7/npm-index.7 @@ -1,310 +1,322 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-INDEX" "7" "July 2014" "" "" +.TH "NPM\-INDEX" "7" "September 2014" "" "" . .SH "NAME" \fBnpm-index\fR \-\- Index of all npm documentation . -npm help .SH "README" +.SS "npm help README" node package manager . -npm help .SH "npm" +.SH "Command Line Documentation" +Using npm on the command line +. +.SS "npm help npm" node package manager . -npm help .SH "npm\-adduser" +.SS "npm help adduser" Add a registry user account . -npm help .SH "npm\-bin" +.SS "npm help bin" Display npm bin folder . -npm help .SH "npm\-bugs" +.SS "npm help bugs" Bugs for a package in a web browser maybe . -npm help .SH "npm\-build" +.SS "npm help build" Build a package . -npm help .SH "npm\-bundle" +.SS "npm help bundle" REMOVED . -npm help .SH "npm\-cache" +.SS "npm help cache" Manipulates packages cache . -npm help .SH "npm\-completion" +.SS "npm help completion" Tab Completion for npm . -npm help .SH "npm\-config" +.SS "npm help config" Manage the npm configuration files . -npm help .SH "npm\-dedupe" +.SS "npm help dedupe" Reduce duplication . -npm help .SH "npm\-deprecate" +.SS "npm help deprecate" Deprecate a version of a package . -npm help .SH "npm\-docs" +.SS "npm help docs" Docs for a package in a web browser maybe . -npm help .SH "npm\-edit" +.SS "npm help edit" Edit an installed package . -npm help .SH "npm\-explore" +.SS "npm help explore" Browse an installed package . -npm help .SH "npm\-help\-search" +.SS "npm help help\-search" Search npm help documentation . -npm help .SH "npm\-help" +.SS "npm help help" Get help on npm . -npm help .SH "npm\-init" +.SS "npm help init" Interactively create a package\.json file . -npm help .SH "npm\-install" +.SS "npm help install" Install a package . -npm help .SH "npm\-link" +.SS "npm help link" Symlink a package folder . -npm help .SH "npm\-ls" +.SS "npm help ls" List installed packages . -npm help .SH "npm\-outdated" +.SS "npm help outdated" Check for outdated packages . -npm help .SH "npm\-owner" +.SS "npm help owner" Manage package owners . -npm help .SH "npm\-pack" +.SS "npm help pack" Create a tarball from a package . -npm help .SH "npm\-prefix" +.SS "npm help prefix" Display prefix . -npm help .SH "npm\-prune" +.SS "npm help prune" Remove extraneous packages . -npm help .SH "npm\-publish" +.SS "npm help publish" Publish a package . -npm help .SH "npm\-rebuild" +.SS "npm help rebuild" Rebuild a package . -npm help .SH "npm\-repo" +.SS "npm help repo" Open package repository page in the browser . -npm help .SH "npm\-restart" +.SS "npm help restart" Start a package . -npm help .SH "npm\-rm" +.SS "npm help rm" Remove a package . -npm help .SH "npm\-root" +.SS "npm help root" Display npm root . -npm help .SH "npm\-run\-script" +.SS "npm help run\-script" Run arbitrary package scripts . -npm help .SH "npm\-search" +.SS "npm help search" Search for packages . -npm help .SH "npm\-shrinkwrap" +.SS "npm help shrinkwrap" Lock down dependency versions . -npm help .SH "npm\-star" +.SS "npm help star" Mark your favorite packages . -npm help .SH "npm\-stars" +.SS "npm help stars" View packages marked as favorites . -npm help .SH "npm\-start" +.SS "npm help start" Start a package . -npm help .SH "npm\-stop" +.SS "npm help stop" Stop a package . -npm help .SH "npm\-submodule" +.SS "npm help submodule" Add a package as a git submodule . -npm help .SH "npm\-tag" +.SS "npm help tag" Tag a published version . -npm help .SH "npm\-test" +.SS "npm help test" Test a package . -npm help .SH "npm\-uninstall" +.SS "npm help uninstall" Remove a package . -npm help .SH "npm\-unpublish" +.SS "npm help unpublish" Remove a package from the registry . -npm help .SH "npm\-update" +.SS "npm help update" Update a package . -npm help .SH "npm\-version" +.SS "npm help version" Bump a package version . -npm help .SH "npm\-view" +.SS "npm help view" View registry info . -npm help .SH "npm\-whoami" +.SS "npm help whoami" Display npm username . -npm apihelp .SH "npm" +.SH "API Documentation" +Using npm in your Node programs +. +.SS "npm apihelp npm" node package manager . -npm apihelp .SH "npm\-bin" +.SS "npm apihelp bin" Display npm bin folder . -npm apihelp .SH "npm\-bugs" +.SS "npm apihelp bugs" Bugs for a package in a web browser maybe . -npm apihelp .SH "npm\-cache" +.SS "npm apihelp cache" manage the npm cache programmatically . -npm apihelp .SH "npm\-commands" +.SS "npm apihelp commands" npm commands . -npm apihelp .SH "npm\-config" +.SS "npm apihelp config" Manage the npm configuration files . -npm apihelp .SH "npm\-deprecate" +.SS "npm apihelp deprecate" Deprecate a version of a package . -npm apihelp .SH "npm\-docs" +.SS "npm apihelp docs" Docs for a package in a web browser maybe . -npm apihelp .SH "npm\-edit" +.SS "npm apihelp edit" Edit an installed package . -npm apihelp .SH "npm\-explore" +.SS "npm apihelp explore" Browse an installed package . -npm apihelp .SH "npm\-help\-search" +.SS "npm apihelp help\-search" Search the help pages . -npm apihelp .SH "npm\-init" +.SS "npm apihelp init" Interactively create a package\.json file . -npm apihelp .SH "npm\-install" +.SS "npm apihelp install" install a package programmatically . -npm apihelp .SH "npm\-link" +.SS "npm apihelp link" Symlink a package folder . -npm apihelp .SH "npm\-load" +.SS "npm apihelp load" Load config settings . -npm apihelp .SH "npm\-ls" +.SS "npm apihelp ls" List installed packages . -npm apihelp .SH "npm\-outdated" +.SS "npm apihelp outdated" Check for outdated packages . -npm apihelp .SH "npm\-owner" +.SS "npm apihelp owner" Manage package owners . -npm apihelp .SH "npm\-pack" +.SS "npm apihelp pack" Create a tarball from a package . -npm apihelp .SH "npm\-prefix" +.SS "npm apihelp prefix" Display prefix . -npm apihelp .SH "npm\-prune" +.SS "npm apihelp prune" Remove extraneous packages . -npm apihelp .SH "npm\-publish" +.SS "npm apihelp publish" Publish a package . -npm apihelp .SH "npm\-rebuild" +.SS "npm apihelp rebuild" Rebuild a package . -npm apihelp .SH "npm\-repo" +.SS "npm apihelp repo" Open package repository page in the browser . -npm apihelp .SH "npm\-restart" +.SS "npm apihelp restart" Start a package . -npm apihelp .SH "npm\-root" +.SS "npm apihelp root" Display npm root . -npm apihelp .SH "npm\-run\-script" +.SS "npm apihelp run\-script" Run arbitrary package scripts . -npm apihelp .SH "npm\-search" +.SS "npm apihelp search" Search for packages . -npm apihelp .SH "npm\-shrinkwrap" +.SS "npm apihelp shrinkwrap" programmatically generate package shrinkwrap file . -npm apihelp .SH "npm\-start" +.SS "npm apihelp start" Start a package . -npm apihelp .SH "npm\-stop" +.SS "npm apihelp stop" Stop a package . -npm apihelp .SH "npm\-submodule" +.SS "npm apihelp submodule" Add a package as a git submodule . -npm apihelp .SH "npm\-tag" +.SS "npm apihelp tag" Tag a published version . -npm apihelp .SH "npm\-test" +.SS "npm apihelp test" Test a package . -npm apihelp .SH "npm\-uninstall" +.SS "npm apihelp uninstall" uninstall a package programmatically . -npm apihelp .SH "npm\-unpublish" +.SS "npm apihelp unpublish" Remove a package from the registry . -npm apihelp .SH "npm\-update" +.SS "npm apihelp update" Update a package . -npm apihelp .SH "npm\-version" +.SS "npm apihelp version" Bump a package version . -npm apihelp .SH "npm\-view" +.SS "npm apihelp view" View registry info . -npm apihelp .SH "npm\-whoami" +.SS "npm apihelp whoami" Display npm username . -npm help .SH "npm\-folders" +.SH "Files" +File system structures npm uses +. +.SS "npm help 5 folders" Folder Structures Used by npm . -npm help .SH "npmrc" +.SS "npm help 5 npmrc" The npm config files . -npm help .SH "package\.json" +.SS "npm help 5 package\.json" Specifics of npm\'s package\.json handling . -npm help .SH "npm\-coding\-style" +.SH "Misc" +Various other bits and bobs +. +.SS "npm help 7 coding\-style" npm\'s "funny" coding style . -npm help .SH "npm\-config" +.SS "npm help 7 config" More than you probably want to know about npm configuration . -npm help .SH "npm\-developers" +.SS "npm help 7 developers" Developer Guide . -npm help .SH "npm\-disputes" +.SS "npm help 7 disputes" Handling Module Name Disputes . -npm help .SH "npm\-faq" +.SS "npm help 7 faq" Frequently Asked Questions . -npm help .SH "npm\-index" +.SS "npm help 7 index" Index of all npm documentation . -npm help .SH "npm\-registry" +.SS "npm help 7 registry" The JavaScript Package Registry . -npm help .SH "npm\-scripts" +.SS "npm help 7 scripts" How npm handles the "scripts" field . -npm help .SH "removing\-npm" +.SS "npm help 7 removing\-npm" Cleaning the Slate . -npm help .SH "semver" +.SS "npm help 7 semver" The semantic versioner for npm diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7 index 2438b7f0ab..c190779ad1 100644 --- a/deps/npm/man/man7/npm-registry.7 +++ b/deps/npm/man/man7/npm-registry.7 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-REGISTRY" "7" "July 2014" "" "" +.TH "NPM\-REGISTRY" "7" "September 2014" "" "" . .SH "NAME" \fBnpm-registry\fR \-\- The JavaScript Package Registry @@ -24,7 +24,7 @@ are CouchDB users, stored in the \fIhttp://isaacs\.iriscouch\.com/_users\fR database\. . .P -npm help npm help The registry URL is supplied by the \fBregistry\fR config parameter\. See \fBnpm\-config\fR, \fBnpmrcnpm help \fR, and \fBnpm\-config\fR for more on managing +The registry URL is supplied by the \fBregistry\fR config parameter\. See npm help \fBnpm\-config\fR, npm help 5 \fBnpmrc\fR, and npm help 7 \fBnpm\-config\fR for more on managing npm\'s configuration\. . .SH "Can I run my own private registry?" @@ -47,7 +47,7 @@ published at all, or \fB"publishConfig":{"registry":"http://my\-internal\-regist to force it to be published only to your internal registry\. . .P -npm help See \fBpackage\.json\fR for more info on what goes in the package\.json file\. +See npm help 5 \fBpackage\.json\fR for more info on what goes in the package\.json file\. . .SH "Will you replicate from my registry into the public one?" No\. If you want things to be public, then publish them into the public @@ -67,16 +67,16 @@ Yes, head over to \fIhttps://npmjs\.org/\fR npm help config . .IP "\(bu" 4 -npm help config +npm help 7 config . .IP "\(bu" 4 -npm help npmrc +npm help 5 npmrc . .IP "\(bu" 4 -npm help developers +npm help 7 developers . .IP "\(bu" 4 -npm help disputes +npm help 7 disputes . .IP "" 0 diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7 new file mode 100644 index 0000000000..ef8d251e0a --- /dev/null +++ b/deps/npm/man/man7/npm-scope.7 @@ -0,0 +1,108 @@ +.TH "NPM\-SCOPE" "7" "September 2014" "" "" +.SH "NAME" +\fBnpm-scope\fR \- Scoped packages +.SH DESCRIPTION +.P +All npm packages have a name\. Some package names also have a scope\. A scope +follows the usual rules for package names (url\-safe characters, no leading dots +or underscores)\. When used in package names, preceded by an @\-symbol and +followed by a slash, e\.g\. +.P +.RS 2 +.EX +@somescope/somepackagename +.EE +.RE +.P +Scopes are a way of grouping related packages together, and also affect a few +things about the way npm treats the package\. +.P +\fBAs of 2014\-09\-03, scoped packages are not supported by the public npm registry\fR\|\. +However, the npm client is backwards\-compatible with un\-scoped registries, so +it can be used to work with scoped and un\-scoped registries at the same time\. +.SH Installing scoped packages +.P +Scoped packages are installed to a sub\-folder of the regular installation +folder, e\.g\. if your other packages are installed in \fBnode_modules/packagename\fR, +scoped modules will be in \fBnode_modules/@myorg/packagename\fR\|\. The scope folder +(\fB@myorg\fR) is simply the name of the scope preceded by an @\-symbol, and can +contain any number of scoped packages\. +.P +A scoped package is install by referencing it by name, preceded by an @\-symbol, +in \fBnpm install\fR: +.P +.RS 2 +.EX +npm install @myorg/mypackage +.EE +.RE +.P +Or in \fBpackage\.json\fR: +.P +.RS 2 +.EX +"dependencies": { + "@myorg/mypackage": "^1\.3\.0" +} +.EE +.RE +.P +Note that if the @\-symbol is omitted in either case npm will instead attempt to +install from GitHub; see npm help \fBnpm\-install\fR\|\. +.SH Requiring scoped packages +.P +Because scoped packages are installed into a scope folder, you have to +include the name of the scope when requiring them in your code, e\.g\. +.P +.RS 2 +.EX +require('@myorg/mypackage') +.EE +.RE +.P +There is nothing special about the way Node treats scope folders, this is +just specifying to require the module \fBmypackage\fR in the folder called \fB@myorg\fR\|\. +.SH Publishing scoped packages +.P +Scoped packages can be published to any registry that supports them\. +\fIAs of 2014\-09\-03, the public npm registry does not support scoped packages\fR, +so attempting to publish a scoped package to the registry will fail unless +you have associated that scope with a different registry, see below\. +.SH Associating a scope with a registry +.P +Scopes can be associated with a separate registry\. This allows you to +seamlessly use a mix of packages from the public npm registry and one or more +private registries, such as npm Enterprise\. +.P +You can associate a scope with a registry at login, e\.g\. +.P +.RS 2 +.EX +npm login \-\-registry=http://reg\.example\.com \-\-scope=@myco +.EE +.RE +.P +Scopes have a many\-to\-one relationship with registries: one registry can +host multiple scopes, but a scope only ever points to one registry\. +.P +You can also associate a scope with a registry using \fBnpm config\fR: +.P +.RS 2 +.EX +npm config set @myco:registry http://reg\.example\.com +.EE +.RE +.P +Once a scope is associated with a registry, any \fBnpm install\fR for a package +with that scope will request packages from that registry instead\. Any +\fBnpm publish\fR for a package name that contains the scope will be published to +that registry instead\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help install +.IP \(bu 2 +npm help publish + +.RE + diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index c42d80e9c0..d4d045f870 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-SCRIPTS" "7" "July 2014" "" "" +.TH "NPM\-SCRIPTS" "7" "September 2014" "" "" . .SH "NAME" \fBnpm-scripts\fR \-\- How npm handles the "scripts" field @@ -319,7 +319,7 @@ only will prevent some optional features, then it\'s better to just print a warning and exit successfully\. . .IP "\(bu" 4 -npm help Try not to use scripts to do what npm can do for you\. Read through \fBpackage\.json\fR to see all the things that you can specify and enable +Try not to use scripts to do what npm can do for you\. Read through npm help 5 \fBpackage\.json\fR to see all the things that you can specify and enable by simply describing your package appropriately\. In general, this will lead to a more robust and consistent state\. . @@ -342,10 +342,10 @@ the user will sudo the npm command in question\. npm help run\-script . .IP "\(bu" 4 -npm help package\.json +npm help 5 package\.json . .IP "\(bu" 4 -npm help developers +npm help 7 developers . .IP "\(bu" 4 npm help install diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7 index f5a0288894..e8a60cdf95 100644 --- a/deps/npm/man/man7/removing-npm.7 +++ b/deps/npm/man/man7/removing-npm.7 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "NPM\-REMOVAL" "1" "July 2014" "" "" +.TH "NPM\-REMOVAL" "1" "September 2014" "" "" . .SH "NAME" \fBnpm-removal\fR \-\- Cleaning the Slate diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index 6a1110fda5..1e64a8df20 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,7 +1,7 @@ .\" Generated with Ronnjs 0.3.8 .\" http://github.com/kapouer/ronnjs/ . -.TH "SEMVER" "7" "July 2014" "" "" +.TH "SEMVER" "7" "September 2014" "" "" . .SH "NAME" \fBsemver\fR \-\- The semantic versioner for npm diff --git a/deps/npm/node_modules/cmd-shim/.npmignore b/deps/npm/node_modules/cmd-shim/.npmignore index 69f75d26c4..699b5d4f13 100644 --- a/deps/npm/node_modules/cmd-shim/.npmignore +++ b/deps/npm/node_modules/cmd-shim/.npmignore @@ -1,16 +1,16 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -npm-debug.log - -node_modules +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log + +node_modules diff --git a/deps/npm/node_modules/cmd-shim/.travis.yml b/deps/npm/node_modules/cmd-shim/.travis.yml index 97e4515832..2ca91f2895 100644 --- a/deps/npm/node_modules/cmd-shim/.travis.yml +++ b/deps/npm/node_modules/cmd-shim/.travis.yml @@ -1,4 +1,4 @@ -language: node_js -node_js: - - "0.10" +language: node_js +node_js: + - "0.10" - "0.8" \ No newline at end of file diff --git a/deps/npm/node_modules/cmd-shim/LICENSE b/deps/npm/node_modules/cmd-shim/LICENSE index 6e93978e0e..0c44ae716d 100644 --- a/deps/npm/node_modules/cmd-shim/LICENSE +++ b/deps/npm/node_modules/cmd-shim/LICENSE @@ -1,27 +1,27 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/npm/node_modules/cmd-shim/README.md b/deps/npm/node_modules/cmd-shim/README.md index 5c6bfa0630..951d3c18c6 100644 --- a/deps/npm/node_modules/cmd-shim/README.md +++ b/deps/npm/node_modules/cmd-shim/README.md @@ -1,44 +1,44 @@ -# cmd-shim - -The cmd-shim used in npm to create executable scripts on Windows, -since symlinks are not suitable for this purpose there. - -On Unix systems, you should use a symbolic link instead. - -[![Build Status](https://img.shields.io/travis/ForbesLindesay/cmd-shim/master.svg)](https://travis-ci.org/ForbesLindesay/cmd-shim) -[![Dependency Status](https://img.shields.io/gemnasium/ForbesLindesay/cmd-shim.svg)](https://gemnasium.com/ForbesLindesay/cmd-shim) -[![NPM version](https://img.shields.io/npm/v/cmd-shim.svg)](http://badge.fury.io/js/cmd-shim) - -## Installation - -``` -npm install cmd-shim -``` - -## API - -### cmdShim(from, to, cb) - -Create a cmd shim at `to` for the command line program at `from`. -e.g. - -```javascript -var cmdShim = require('cmd-shim'); -cmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) { - if (err) throw err; -}); -``` - -### cmdShim.ifExists(from, to, cb) - -The same as above, but will just continue if the file does not exist. -Source: - -```javascript -function cmdShimIfExists (from, to, cb) { - fs.stat(from, function (er) { - if (er) return cb() - cmdShim(from, to, cb) - }) -} -``` +# cmd-shim + +The cmd-shim used in npm to create executable scripts on Windows, +since symlinks are not suitable for this purpose there. + +On Unix systems, you should use a symbolic link instead. + +[![Build Status](https://img.shields.io/travis/ForbesLindesay/cmd-shim/master.svg)](https://travis-ci.org/ForbesLindesay/cmd-shim) +[![Dependency Status](https://img.shields.io/gemnasium/ForbesLindesay/cmd-shim.svg)](https://gemnasium.com/ForbesLindesay/cmd-shim) +[![NPM version](https://img.shields.io/npm/v/cmd-shim.svg)](http://badge.fury.io/js/cmd-shim) + +## Installation + +``` +npm install cmd-shim +``` + +## API + +### cmdShim(from, to, cb) + +Create a cmd shim at `to` for the command line program at `from`. +e.g. + +```javascript +var cmdShim = require('cmd-shim'); +cmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) { + if (err) throw err; +}); +``` + +### cmdShim.ifExists(from, to, cb) + +The same as above, but will just continue if the file does not exist. +Source: + +```javascript +function cmdShimIfExists (from, to, cb) { + fs.stat(from, function (er) { + if (er) return cb() + cmdShim(from, to, cb) + }) +} +``` diff --git a/deps/npm/node_modules/cmd-shim/index.js b/deps/npm/node_modules/cmd-shim/index.js index 12452e3a78..7853e8605d 100644 --- a/deps/npm/node_modules/cmd-shim/index.js +++ b/deps/npm/node_modules/cmd-shim/index.js @@ -1,184 +1,184 @@ -// On windows, create a .cmd file. -// Read the #! in the file to see what it uses. The vast majority -// of the time, this will be either: -// "#!/usr/bin/env " -// or: -// "#! " -// -// Write a binroot/pkg.bin + ".cmd" file that has this line in it: -// @ %~dp0 %* - -module.exports = cmdShim -cmdShim.ifExists = cmdShimIfExists - -try { - var fs = require("graceful-fs") -} catch (e) { - var fs = require("fs") -} - -var mkdir = require("mkdirp") - , path = require("path") - , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/ - -function cmdShimIfExists (from, to, cb) { - fs.stat(from, function (er) { - if (er) return cb() - cmdShim(from, to, cb) - }) -} - -// Try to unlink, but ignore errors. -// Any problems will surface later. -function rm (path, cb) { - fs.unlink(path, function(er) { - cb() - }) -} - -function cmdShim (from, to, cb) { - fs.stat(from, function (er, stat) { - if (er) - return cb(er) - - cmdShim_(from, to, cb) - }) -} - -function cmdShim_ (from, to, cb) { - var then = times(2, next, cb) - rm(to, then) - rm(to + ".cmd", then) - - function next(er) { - writeShim(from, to, cb) - } -} - -function writeShim (from, to, cb) { - // make a cmd file and a sh script - // First, check if the bin is a #! of some sort. - // If not, then assume it's something that'll be compiled, or some other - // sort of script, and just call it directly. - mkdir(path.dirname(to), function (er) { - if (er) - return cb(er) - fs.readFile(from, "utf8", function (er, data) { - if (er) return writeShim_(from, to, null, null, cb) - var firstLine = data.trim().split(/\r*\n/)[0] - , shebang = firstLine.match(shebangExpr) - if (!shebang) return writeShim_(from, to, null, null, cb) - var prog = shebang[1] - , args = shebang[2] || "" - return writeShim_(from, to, prog, args, cb) - }) - }) -} - -function writeShim_ (from, to, prog, args, cb) { - var shTarget = path.relative(path.dirname(to), from) - , target = shTarget.split("/").join("\\") - , longProg - , shProg = prog && prog.split("\\").join("/") - , shLongProg - shTarget = shTarget.split("\\").join("/") - args = args || "" - if (!prog) { - prog = "\"%~dp0\\" + target + "\"" - shProg = "\"$basedir/" + shTarget + "\"" - args = "" - target = "" - shTarget = "" - } else { - longProg = "\"%~dp0\\" + prog + ".exe\"" - shLongProg = "\"$basedir/" + prog + "\"" - target = "\"%~dp0\\" + target + "\"" - shTarget = "\"$basedir/" + shTarget + "\"" - } - - // @IF EXIST "%~dp0\node.exe" ( - // "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* - // ) ELSE ( - // SETLOCAL - // SET PATHEXT=%PATHEXT:;.JS;=;% - // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* - // ) - var cmd - if (longProg) { - cmd = "@IF EXIST " + longProg + " (\r\n" - + " " + longProg + " " + args + " " + target + " %*\r\n" - + ") ELSE (\r\n" - + " @SETLOCAL\r\n" - + " @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n" - + " " + prog + " " + args + " " + target + " %*\r\n" - + ")" - } else { - cmd = prog + " " + args + " " + target + " %*\r\n" - } - - // #!/bin/sh - // basedir=`dirname "$0"` - // - // case `uname` in - // *CYGWIN*) basedir=`cygpath -w "$basedir"`;; - // esac - // - // if [ -x "$basedir/node.exe" ]; then - // "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@" - // ret=$? - // else - // node "$basedir/node_modules/npm/bin/npm-cli.js" "$@" - // ret=$? - // fi - // exit $ret - - var sh = "#!/bin/sh\n" - - if (shLongProg) { - sh = sh - + "basedir=`dirname \"$0\"`\n" - + "\n" - + "case `uname` in\n" - + " *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\n" - + "esac\n" - + "\n" - - sh = sh - + "if [ -x "+shLongProg+" ]; then\n" - + " " + shLongProg + " " + args + " " + shTarget + " \"$@\"\n" - + " ret=$?\n" - + "else \n" - + " " + shProg + " " + args + " " + shTarget + " \"$@\"\n" - + " ret=$?\n" - + "fi\n" - + "exit $ret\n" - } else { - sh = shProg + " " + args + " " + shTarget + " \"$@\"\n" - + "exit $?\n" - } - - var then = times(2, next, cb) - fs.writeFile(to + ".cmd", cmd, "utf8", then) - fs.writeFile(to, sh, "utf8", then) - function next () { - chmodShim(to, cb) - } -} - -function chmodShim (to, cb) { - var then = times(2, cb, cb) - fs.chmod(to, 0755, then) - fs.chmod(to + ".cmd", 0755, then) -} - -function times(n, ok, cb) { - var errState = null - return function(er) { - if (!errState) { - if (er) - cb(errState = er) - else if (--n === 0) - ok() - } - } -} +// On windows, create a .cmd file. +// Read the #! in the file to see what it uses. The vast majority +// of the time, this will be either: +// "#!/usr/bin/env " +// or: +// "#! " +// +// Write a binroot/pkg.bin + ".cmd" file that has this line in it: +// @ %~dp0 %* + +module.exports = cmdShim +cmdShim.ifExists = cmdShimIfExists + +try { + var fs = require("graceful-fs") +} catch (e) { + var fs = require("fs") +} + +var mkdir = require("mkdirp") + , path = require("path") + , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/ + +function cmdShimIfExists (from, to, cb) { + fs.stat(from, function (er) { + if (er) return cb() + cmdShim(from, to, cb) + }) +} + +// Try to unlink, but ignore errors. +// Any problems will surface later. +function rm (path, cb) { + fs.unlink(path, function(er) { + cb() + }) +} + +function cmdShim (from, to, cb) { + fs.stat(from, function (er, stat) { + if (er) + return cb(er) + + cmdShim_(from, to, cb) + }) +} + +function cmdShim_ (from, to, cb) { + var then = times(2, next, cb) + rm(to, then) + rm(to + ".cmd", then) + + function next(er) { + writeShim(from, to, cb) + } +} + +function writeShim (from, to, cb) { + // make a cmd file and a sh script + // First, check if the bin is a #! of some sort. + // If not, then assume it's something that'll be compiled, or some other + // sort of script, and just call it directly. + mkdir(path.dirname(to), function (er) { + if (er) + return cb(er) + fs.readFile(from, "utf8", function (er, data) { + if (er) return writeShim_(from, to, null, null, cb) + var firstLine = data.trim().split(/\r*\n/)[0] + , shebang = firstLine.match(shebangExpr) + if (!shebang) return writeShim_(from, to, null, null, cb) + var prog = shebang[1] + , args = shebang[2] || "" + return writeShim_(from, to, prog, args, cb) + }) + }) +} + +function writeShim_ (from, to, prog, args, cb) { + var shTarget = path.relative(path.dirname(to), from) + , target = shTarget.split("/").join("\\") + , longProg + , shProg = prog && prog.split("\\").join("/") + , shLongProg + shTarget = shTarget.split("\\").join("/") + args = args || "" + if (!prog) { + prog = "\"%~dp0\\" + target + "\"" + shProg = "\"$basedir/" + shTarget + "\"" + args = "" + target = "" + shTarget = "" + } else { + longProg = "\"%~dp0\\" + prog + ".exe\"" + shLongProg = "\"$basedir/" + prog + "\"" + target = "\"%~dp0\\" + target + "\"" + shTarget = "\"$basedir/" + shTarget + "\"" + } + + // @IF EXIST "%~dp0\node.exe" ( + // "%~dp0\node.exe" "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* + // ) ELSE ( + // SETLOCAL + // SET PATHEXT=%PATHEXT:;.JS;=;% + // node "%~dp0\.\node_modules\npm\bin\npm-cli.js" %* + // ) + var cmd + if (longProg) { + cmd = "@IF EXIST " + longProg + " (\r\n" + + " " + longProg + " " + args + " " + target + " %*\r\n" + + ") ELSE (\r\n" + + " @SETLOCAL\r\n" + + " @SET PATHEXT=%PATHEXT:;.JS;=;%\r\n" + + " " + prog + " " + args + " " + target + " %*\r\n" + + ")" + } else { + cmd = prog + " " + args + " " + target + " %*\r\n" + } + + // #!/bin/sh + // basedir=`dirname "$0"` + // + // case `uname` in + // *CYGWIN*) basedir=`cygpath -w "$basedir"`;; + // esac + // + // if [ -x "$basedir/node.exe" ]; then + // "$basedir/node.exe" "$basedir/node_modules/npm/bin/npm-cli.js" "$@" + // ret=$? + // else + // node "$basedir/node_modules/npm/bin/npm-cli.js" "$@" + // ret=$? + // fi + // exit $ret + + var sh = "#!/bin/sh\n" + + if (shLongProg) { + sh = sh + + "basedir=`dirname \"$0\"`\n" + + "\n" + + "case `uname` in\n" + + " *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;\n" + + "esac\n" + + "\n" + + sh = sh + + "if [ -x "+shLongProg+" ]; then\n" + + " " + shLongProg + " " + args + " " + shTarget + " \"$@\"\n" + + " ret=$?\n" + + "else \n" + + " " + shProg + " " + args + " " + shTarget + " \"$@\"\n" + + " ret=$?\n" + + "fi\n" + + "exit $ret\n" + } else { + sh = shProg + " " + args + " " + shTarget + " \"$@\"\n" + + "exit $?\n" + } + + var then = times(2, next, cb) + fs.writeFile(to + ".cmd", cmd, "utf8", then) + fs.writeFile(to, sh, "utf8", then) + function next () { + chmodShim(to, cb) + } +} + +function chmodShim (to, cb) { + var then = times(2, cb, cb) + fs.chmod(to, 0755, then) + fs.chmod(to + ".cmd", 0755, then) +} + +function times(n, ok, cb) { + var errState = null + return function(er) { + if (!errState) { + if (er) + cb(errState = er) + else if (--n === 0) + ok() + } + } +} diff --git a/deps/npm/node_modules/cmd-shim/package.json b/deps/npm/node_modules/cmd-shim/package.json index eebd59ecbc..09f0c48a4d 100644 --- a/deps/npm/node_modules/cmd-shim/package.json +++ b/deps/npm/node_modules/cmd-shim/package.json @@ -1,6 +1,6 @@ { "name": "cmd-shim", - "version": "1.1.2", + "version": "2.0.0", "description": "Used in npm for command line application support", "scripts": { "test": "tap test/*.js" @@ -11,39 +11,25 @@ }, "license": "BSD", "optionalDependencies": { - "graceful-fs": "2" + "graceful-fs": "^3.0.2" }, "dependencies": { "mkdirp": "~0.5.0", - "graceful-fs": "2" + "graceful-fs": "^3.0.2" }, "devDependencies": { "tap": "~0.4.11", "rimraf": "~2.2.8" }, + "readme": "# cmd-shim\n\nThe cmd-shim used in npm to create executable scripts on Windows,\nsince symlinks are not suitable for this purpose there.\n\nOn Unix systems, you should use a symbolic link instead.\n\n[![Build Status](https://img.shields.io/travis/ForbesLindesay/cmd-shim/master.svg)](https://travis-ci.org/ForbesLindesay/cmd-shim)\n[![Dependency Status](https://img.shields.io/gemnasium/ForbesLindesay/cmd-shim.svg)](https://gemnasium.com/ForbesLindesay/cmd-shim)\n[![NPM version](https://img.shields.io/npm/v/cmd-shim.svg)](http://badge.fury.io/js/cmd-shim)\n\n## Installation\n\n```\nnpm install cmd-shim\n```\n\n## API\n\n### cmdShim(from, to, cb)\n\nCreate a cmd shim at `to` for the command line program at `from`.\ne.g.\n\n```javascript\nvar cmdShim = require('cmd-shim');\ncmdShim(__dirname + '/cli.js', '/usr/bin/command-name', function (err) {\n if (err) throw err;\n});\n```\n\n### cmdShim.ifExists(from, to, cb)\n\nThe same as above, but will just continue if the file does not exist.\nSource:\n\n```javascript\nfunction cmdShimIfExists (from, to, cb) {\n fs.stat(from, function (er) {\n if (er) return cb()\n cmdShim(from, to, cb)\n })\n}\n```\n", + "readmeFilename": "README.md", "bugs": { "url": "https://github.com/ForbesLindesay/cmd-shim/issues" }, "homepage": "https://github.com/ForbesLindesay/cmd-shim", - "_id": "cmd-shim@1.1.2", - "dist": { - "shasum": "e4f9198802e361e8eb43b591959ef4dc6cdb6754", - "tarball": "http://registry.npmjs.org/cmd-shim/-/cmd-shim-1.1.2.tgz" - }, - "_from": "cmd-shim@~1.1.1", - "_npmVersion": "1.4.3", - "_npmUser": { - "name": "forbeslindesay", - "email": "forbes@lindeay.co.uk" - }, - "maintainers": [ - { - "name": "forbeslindesay", - "email": "forbes@lindesay.co.uk" - } - ], - "directories": {}, - "_shasum": "e4f9198802e361e8eb43b591959ef4dc6cdb6754", - "_resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-1.1.2.tgz", - "readme": "ERROR: No README data found!" + "_id": "cmd-shim@2.0.0", + "_shasum": "64fd5859110051571406f61821bf37d366bc3cb3", + "_resolved": "git://github.com/othiym23/cmd-shim#12de64ca97f45ac600910092f19afacc3d5376dd", + "_from": "git://github.com/othiym23/cmd-shim", + "_fromGithub": true } diff --git a/deps/npm/node_modules/cmd-shim/test/00-setup.js b/deps/npm/node_modules/cmd-shim/test/00-setup.js index f2689e6f4d..04ec2b256b 100644 --- a/deps/npm/node_modules/cmd-shim/test/00-setup.js +++ b/deps/npm/node_modules/cmd-shim/test/00-setup.js @@ -1,34 +1,34 @@ -var test = require('tap').test -var mkdirp = require('mkdirp') -var fs = require('fs') -var path = require('path') -var fixtures = path.resolve(__dirname, 'fixtures') - -var froms = { - 'from.exe': 'exe', - 'from.env': '#!/usr/bin/env node\nconsole.log(/hi/)\n', - 'from.env.args': '#!/usr/bin/env node --expose_gc\ngc()\n', - 'from.sh': '#!/usr/bin/sh\necho hi\n', - 'from.sh.args': '#!/usr/bin/sh -x\necho hi\n' -} - -var cmdShim = require('../') - -test('create fixture', function (t) { - mkdirp(fixtures, function (er) { - if (er) - throw er - t.pass('made dir') - Object.keys(froms).forEach(function (f) { - t.test('write ' + f, function (t) { - fs.writeFile(path.resolve(fixtures, f), froms[f], function (er) { - if (er) - throw er - t.pass('wrote ' + f) - t.end() - }) - }) - }) - t.end() - }) -}) +var test = require('tap').test +var mkdirp = require('mkdirp') +var fs = require('fs') +var path = require('path') +var fixtures = path.resolve(__dirname, 'fixtures') + +var froms = { + 'from.exe': 'exe', + 'from.env': '#!/usr/bin/env node\nconsole.log(/hi/)\n', + 'from.env.args': '#!/usr/bin/env node --expose_gc\ngc()\n', + 'from.sh': '#!/usr/bin/sh\necho hi\n', + 'from.sh.args': '#!/usr/bin/sh -x\necho hi\n' +} + +var cmdShim = require('../') + +test('create fixture', function (t) { + mkdirp(fixtures, function (er) { + if (er) + throw er + t.pass('made dir') + Object.keys(froms).forEach(function (f) { + t.test('write ' + f, function (t) { + fs.writeFile(path.resolve(fixtures, f), froms[f], function (er) { + if (er) + throw er + t.pass('wrote ' + f) + t.end() + }) + }) + }) + t.end() + }) +}) diff --git a/deps/npm/node_modules/cmd-shim/test/basic.js b/deps/npm/node_modules/cmd-shim/test/basic.js old mode 100644 new mode 100755 index 004bf9d5c3..3cb42347d3 --- a/deps/npm/node_modules/cmd-shim/test/basic.js +++ b/deps/npm/node_modules/cmd-shim/test/basic.js @@ -1,175 +1,175 @@ -var test = require('tap').test -var mkdirp = require('mkdirp') -var fs = require('fs') -var path = require('path') -var fixtures = path.resolve(__dirname, 'fixtures') - -var cmdShim = require('../') - -test('no shebang', function (t) { - var from = path.resolve(fixtures, 'from.exe') - var to = path.resolve(fixtures, 'exe.shim') - cmdShim(from, to, function(er) { - if (er) - throw er - t.equal(fs.readFileSync(to, 'utf8'), - "\"$basedir/from.exe\" \"$@\"\nexit $?\n") - t.equal(fs.readFileSync(to + '.cmd', 'utf8'), - "\"%~dp0\\from.exe\" %*\r\n") - t.end() - }) -}) - -test('env shebang', function (t) { - var from = path.resolve(fixtures, 'from.env') - var to = path.resolve(fixtures, 'env.shim') - cmdShim(from, to, function(er) { - if (er) - throw er - console.error('%j', fs.readFileSync(to, 'utf8')) - console.error('%j', fs.readFileSync(to + '.cmd', 'utf8')) - - t.equal(fs.readFileSync(to, 'utf8'), - "#!/bin/sh"+ - "\nbasedir=`dirname \"$0\"`"+ - "\n"+ - "\ncase `uname` in"+ - "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+ - "\nesac"+ - "\n"+ - "\nif [ -x \"$basedir/node\" ]; then"+ - "\n \"$basedir/node\" \"$basedir/from.env\" \"$@\""+ - "\n ret=$?"+ - "\nelse "+ - "\n node \"$basedir/from.env\" \"$@\""+ - "\n ret=$?"+ - "\nfi"+ - "\nexit $ret"+ - "\n") - t.equal(fs.readFileSync(to + '.cmd', 'utf8'), - "@IF EXIST \"%~dp0\\node.exe\" (\r"+ - "\n \"%~dp0\\node.exe\" \"%~dp0\\from.env\" %*\r"+ - "\n) ELSE (\r"+ - "\n @SETLOCAL\r"+ - "\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+ - "\n node \"%~dp0\\from.env\" %*\r"+ - "\n)") - t.end() - }) -}) - -test('env shebang with args', function (t) { - var from = path.resolve(fixtures, 'from.env.args') - var to = path.resolve(fixtures, 'env.args.shim') - cmdShim(from, to, function(er) { - if (er) - throw er - console.error('%j', fs.readFileSync(to, 'utf8')) - console.error('%j', fs.readFileSync(to + '.cmd', 'utf8')) - - t.equal(fs.readFileSync(to, 'utf8'), - "#!/bin/sh"+ - "\nbasedir=`dirname \"$0\"`"+ - "\n"+ - "\ncase `uname` in"+ - "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+ - "\nesac"+ - "\n"+ - "\nif [ -x \"$basedir/node\" ]; then"+ - "\n \"$basedir/node\" --expose_gc \"$basedir/from.env.args\" \"$@\""+ - "\n ret=$?"+ - "\nelse "+ - "\n node --expose_gc \"$basedir/from.env.args\" \"$@\""+ - "\n ret=$?"+ - "\nfi"+ - "\nexit $ret"+ - "\n") - t.equal(fs.readFileSync(to + '.cmd', 'utf8'), - "@IF EXIST \"%~dp0\\node.exe\" (\r"+ - "\n \"%~dp0\\node.exe\" --expose_gc \"%~dp0\\from.env.args\" %*\r"+ - "\n) ELSE (\r"+ - "\n @SETLOCAL\r"+ - "\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+ - "\n node --expose_gc \"%~dp0\\from.env.args\" %*\r"+ - "\n)") - t.end() - }) -}) - -test('explicit shebang', function (t) { - var from = path.resolve(fixtures, 'from.sh') - var to = path.resolve(fixtures, 'sh.shim') - cmdShim(from, to, function(er) { - if (er) - throw er - console.error('%j', fs.readFileSync(to, 'utf8')) - console.error('%j', fs.readFileSync(to + '.cmd', 'utf8')) - - t.equal(fs.readFileSync(to, 'utf8'), - "#!/bin/sh" + - "\nbasedir=`dirname \"$0\"`" + - "\n" + - "\ncase `uname` in" + - "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" + - "\nesac" + - "\n" + - "\nif [ -x \"$basedir//usr/bin/sh\" ]; then" + - "\n \"$basedir//usr/bin/sh\" \"$basedir/from.sh\" \"$@\"" + - "\n ret=$?" + - "\nelse " + - "\n /usr/bin/sh \"$basedir/from.sh\" \"$@\"" + - "\n ret=$?" + - "\nfi" + - "\nexit $ret" + - "\n") - - t.equal(fs.readFileSync(to + '.cmd', 'utf8'), - "@IF EXIST \"%~dp0\\/usr/bin/sh.exe\" (\r" + - "\n \"%~dp0\\/usr/bin/sh.exe\" \"%~dp0\\from.sh\" %*\r" + - "\n) ELSE (\r" + - "\n @SETLOCAL\r"+ - "\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+ - "\n /usr/bin/sh \"%~dp0\\from.sh\" %*\r" + - "\n)") - t.end() - }) -}) - -test('explicit shebang with args', function (t) { - var from = path.resolve(fixtures, 'from.sh.args') - var to = path.resolve(fixtures, 'sh.args.shim') - cmdShim(from, to, function(er) { - if (er) - throw er - console.error('%j', fs.readFileSync(to, 'utf8')) - console.error('%j', fs.readFileSync(to + '.cmd', 'utf8')) - - t.equal(fs.readFileSync(to, 'utf8'), - "#!/bin/sh" + - "\nbasedir=`dirname \"$0\"`" + - "\n" + - "\ncase `uname` in" + - "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" + - "\nesac" + - "\n" + - "\nif [ -x \"$basedir//usr/bin/sh\" ]; then" + - "\n \"$basedir//usr/bin/sh\" -x \"$basedir/from.sh.args\" \"$@\"" + - "\n ret=$?" + - "\nelse " + - "\n /usr/bin/sh -x \"$basedir/from.sh.args\" \"$@\"" + - "\n ret=$?" + - "\nfi" + - "\nexit $ret" + - "\n") - - t.equal(fs.readFileSync(to + '.cmd', 'utf8'), - "@IF EXIST \"%~dp0\\/usr/bin/sh.exe\" (\r" + - "\n \"%~dp0\\/usr/bin/sh.exe\" -x \"%~dp0\\from.sh.args\" %*\r" + - "\n) ELSE (\r" + - "\n @SETLOCAL\r"+ - "\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+ - "\n /usr/bin/sh -x \"%~dp0\\from.sh.args\" %*\r" + - "\n)") - t.end() - }) -}) +var test = require('tap').test +var mkdirp = require('mkdirp') +var fs = require('fs') +var path = require('path') +var fixtures = path.resolve(__dirname, 'fixtures') + +var cmdShim = require('../') + +test('no shebang', function (t) { + var from = path.resolve(fixtures, 'from.exe') + var to = path.resolve(fixtures, 'exe.shim') + cmdShim(from, to, function(er) { + if (er) + throw er + t.equal(fs.readFileSync(to, 'utf8'), + "\"$basedir/from.exe\" \"$@\"\nexit $?\n") + t.equal(fs.readFileSync(to + '.cmd', 'utf8'), + "\"%~dp0\\from.exe\" %*\r\n") + t.end() + }) +}) + +test('env shebang', function (t) { + var from = path.resolve(fixtures, 'from.env') + var to = path.resolve(fixtures, 'env.shim') + cmdShim(from, to, function(er) { + if (er) + throw er + console.error('%j', fs.readFileSync(to, 'utf8')) + console.error('%j', fs.readFileSync(to + '.cmd', 'utf8')) + + t.equal(fs.readFileSync(to, 'utf8'), + "#!/bin/sh"+ + "\nbasedir=`dirname \"$0\"`"+ + "\n"+ + "\ncase `uname` in"+ + "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+ + "\nesac"+ + "\n"+ + "\nif [ -x \"$basedir/node\" ]; then"+ + "\n \"$basedir/node\" \"$basedir/from.env\" \"$@\""+ + "\n ret=$?"+ + "\nelse "+ + "\n node \"$basedir/from.env\" \"$@\""+ + "\n ret=$?"+ + "\nfi"+ + "\nexit $ret"+ + "\n") + t.equal(fs.readFileSync(to + '.cmd', 'utf8'), + "@IF EXIST \"%~dp0\\node.exe\" (\r"+ + "\n \"%~dp0\\node.exe\" \"%~dp0\\from.env\" %*\r"+ + "\n) ELSE (\r"+ + "\n @SETLOCAL\r"+ + "\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+ + "\n node \"%~dp0\\from.env\" %*\r"+ + "\n)") + t.end() + }) +}) + +test('env shebang with args', function (t) { + var from = path.resolve(fixtures, 'from.env.args') + var to = path.resolve(fixtures, 'env.args.shim') + cmdShim(from, to, function(er) { + if (er) + throw er + console.error('%j', fs.readFileSync(to, 'utf8')) + console.error('%j', fs.readFileSync(to + '.cmd', 'utf8')) + + t.equal(fs.readFileSync(to, 'utf8'), + "#!/bin/sh"+ + "\nbasedir=`dirname \"$0\"`"+ + "\n"+ + "\ncase `uname` in"+ + "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;"+ + "\nesac"+ + "\n"+ + "\nif [ -x \"$basedir/node\" ]; then"+ + "\n \"$basedir/node\" --expose_gc \"$basedir/from.env.args\" \"$@\""+ + "\n ret=$?"+ + "\nelse "+ + "\n node --expose_gc \"$basedir/from.env.args\" \"$@\""+ + "\n ret=$?"+ + "\nfi"+ + "\nexit $ret"+ + "\n") + t.equal(fs.readFileSync(to + '.cmd', 'utf8'), + "@IF EXIST \"%~dp0\\node.exe\" (\r"+ + "\n \"%~dp0\\node.exe\" --expose_gc \"%~dp0\\from.env.args\" %*\r"+ + "\n) ELSE (\r"+ + "\n @SETLOCAL\r"+ + "\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+ + "\n node --expose_gc \"%~dp0\\from.env.args\" %*\r"+ + "\n)") + t.end() + }) +}) + +test('explicit shebang', function (t) { + var from = path.resolve(fixtures, 'from.sh') + var to = path.resolve(fixtures, 'sh.shim') + cmdShim(from, to, function(er) { + if (er) + throw er + console.error('%j', fs.readFileSync(to, 'utf8')) + console.error('%j', fs.readFileSync(to + '.cmd', 'utf8')) + + t.equal(fs.readFileSync(to, 'utf8'), + "#!/bin/sh" + + "\nbasedir=`dirname \"$0\"`" + + "\n" + + "\ncase `uname` in" + + "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" + + "\nesac" + + "\n" + + "\nif [ -x \"$basedir//usr/bin/sh\" ]; then" + + "\n \"$basedir//usr/bin/sh\" \"$basedir/from.sh\" \"$@\"" + + "\n ret=$?" + + "\nelse " + + "\n /usr/bin/sh \"$basedir/from.sh\" \"$@\"" + + "\n ret=$?" + + "\nfi" + + "\nexit $ret" + + "\n") + + t.equal(fs.readFileSync(to + '.cmd', 'utf8'), + "@IF EXIST \"%~dp0\\/usr/bin/sh.exe\" (\r" + + "\n \"%~dp0\\/usr/bin/sh.exe\" \"%~dp0\\from.sh\" %*\r" + + "\n) ELSE (\r" + + "\n @SETLOCAL\r"+ + "\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+ + "\n /usr/bin/sh \"%~dp0\\from.sh\" %*\r" + + "\n)") + t.end() + }) +}) + +test('explicit shebang with args', function (t) { + var from = path.resolve(fixtures, 'from.sh.args') + var to = path.resolve(fixtures, 'sh.args.shim') + cmdShim(from, to, function(er) { + if (er) + throw er + console.error('%j', fs.readFileSync(to, 'utf8')) + console.error('%j', fs.readFileSync(to + '.cmd', 'utf8')) + + t.equal(fs.readFileSync(to, 'utf8'), + "#!/bin/sh" + + "\nbasedir=`dirname \"$0\"`" + + "\n" + + "\ncase `uname` in" + + "\n *CYGWIN*) basedir=`cygpath -w \"$basedir\"`;;" + + "\nesac" + + "\n" + + "\nif [ -x \"$basedir//usr/bin/sh\" ]; then" + + "\n \"$basedir//usr/bin/sh\" -x \"$basedir/from.sh.args\" \"$@\"" + + "\n ret=$?" + + "\nelse " + + "\n /usr/bin/sh -x \"$basedir/from.sh.args\" \"$@\"" + + "\n ret=$?" + + "\nfi" + + "\nexit $ret" + + "\n") + + t.equal(fs.readFileSync(to + '.cmd', 'utf8'), + "@IF EXIST \"%~dp0\\/usr/bin/sh.exe\" (\r" + + "\n \"%~dp0\\/usr/bin/sh.exe\" -x \"%~dp0\\from.sh.args\" %*\r" + + "\n) ELSE (\r" + + "\n @SETLOCAL\r"+ + "\n @SET PATHEXT=%PATHEXT:;.JS;=;%\r"+ + "\n /usr/bin/sh -x \"%~dp0\\from.sh.args\" %*\r" + + "\n)") + t.end() + }) +}) diff --git a/deps/npm/node_modules/cmd-shim/test/zz-cleanup.js b/deps/npm/node_modules/cmd-shim/test/zz-cleanup.js index 47b7899616..9425031001 100644 --- a/deps/npm/node_modules/cmd-shim/test/zz-cleanup.js +++ b/deps/npm/node_modules/cmd-shim/test/zz-cleanup.js @@ -1,13 +1,13 @@ -var test = require('tap').test -var path = require('path') -var fixtures = path.resolve(__dirname, 'fixtures') -var rimraf = require('rimraf') - -test('cleanup', function(t) { - rimraf(fixtures, function(er) { - if (er) - throw er - t.pass('cleaned up') - t.end() - }) -}) +var test = require('tap').test +var path = require('path') +var fixtures = path.resolve(__dirname, 'fixtures') +var rimraf = require('rimraf') + +test('cleanup', function(t) { + rimraf(fixtures, function(er) { + if (er) + throw er + t.pass('cleaned up') + t.end() + }) +}) diff --git a/deps/npm/node_modules/columnify/Readme.md b/deps/npm/node_modules/columnify/Readme.md index a20739b653..43ae36c2c4 100644 --- a/deps/npm/node_modules/columnify/Readme.md +++ b/deps/npm/node_modules/columnify/Readme.md @@ -191,7 +191,7 @@ module2 0.2.0 ## Other Configuration Options -### Align Right +### Align Right/Center ```js var data = { @@ -211,6 +211,27 @@ commander@2.0.0 1 debug@0.8.1 1 ``` +Align Center works in a similar way. + + +### Padding + +```js +var data = { + "shortKey": "veryVeryVeryVeryVeryLongVal", + "veryVeryVeryVeryVeryLongKey": "shortVal" +} + +columnify(data, { paddingChr: '.'}) +``` + +#### Output: +``` +KEY........................ VALUE...................... +shortKey................... veryVeryVeryVeryVeryLongVal +veryVeryVeryVeryVeryLongKey shortVal................... +``` + ### Preserve existing newlines By default, `columnify` sanitises text by replacing any occurance of 1 or more whitespace characters with a single space. @@ -344,5 +365,3 @@ module-one some description 0.0.1 ## License MIT - - diff --git a/deps/npm/node_modules/columnify/index.js b/deps/npm/node_modules/columnify/index.js index 63257dcecc..c44b8ca8fa 100644 --- a/deps/npm/node_modules/columnify/index.js +++ b/deps/npm/node_modules/columnify/index.js @@ -3,6 +3,7 @@ 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 @@ -15,6 +16,8 @@ var DEFAULTS = { truncate: false, truncateMarker: '…', preserveNewLines: false, + paddingChr: ' ', + showHeaders: true, headingTransform: function(key) { return key.toUpperCase() }, @@ -40,6 +43,7 @@ module.exports = function(items, options) { 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 @@ -99,12 +103,13 @@ module.exports = function(items, options) { // add headers var headers = {} - columnNames.forEach(function(columnName) { - var column = columns[columnName] - headers[columnName] = column.headingTransform(columnName) - }) - items.unshift(headers) - + if(options.showHeaders) { + columnNames.forEach(function(columnName) { + var column = columns[columnName] + headers[columnName] = column.headingTransform(columnName) + }) + items.unshift(headers) + } // get actual max-width between min & max // based on length of data in columns columnNames.forEach(function(columnName) { @@ -156,7 +161,7 @@ module.exports = function(items, options) { }) - var rows = createRows(items, columns, columnNames) // merge lines into rows + 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) { @@ -176,7 +181,7 @@ module.exports = function(items, options) { * @return Array items wrapped in arrays, corresponding to lines */ -function createRows(items, columns, columnNames) { +function createRows(items, columns, columnNames, paddingChr) { return items.map(function(item) { var row = [] var numLines = 0 @@ -189,8 +194,9 @@ function createRows(items, columns, columnNames) { 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)) - else row[i].push(padRight(val, column.width)) + if (column.align == 'right') row[i].push(padLeft(val, column.width, paddingChr)) + else if (column.align == 'center') row[i].push(padCenter(val, column.width, paddingChr)) + else row[i].push(padRight(val, column.width, paddingChr)) }) } return row diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js b/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js index 11e072e4ea..099480fbfc 100644 --- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js @@ -1,5 +1,5 @@ 'use strict'; -var ansiRegex = require('ansi-regex'); +var ansiRegex = require('ansi-regex')(); module.exports = function (str) { return typeof str === 'string' ? str.replace(ansiRegex, '') : str; diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js index 182e434578..783c5c7bb6 100644 --- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/index.js @@ -1,2 +1,4 @@ 'use strict'; -module.exports = /\x1B\[([0-9]{1,3}(;[0-9]{1,3})*)?[m|K]/g; +module.exports = function () { + return /\u001b\[(?:[0-9]{1,3}(?:;[0-9]{1,3})*)?[m|K]/g; +}; diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json index 6b53e50dc6..716ae00899 100644 --- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/package.json @@ -1,6 +1,6 @@ { "name": "ansi-regex", - "version": "0.1.0", + "version": "0.2.1", "description": "Regular expression for matching ANSI escape codes", "license": "MIT", "repository": { @@ -42,7 +42,11 @@ "text", "regex", "regexp", - "re" + "re", + "match", + "test", + "find", + "pattern" ], "devDependencies": { "mocha": "*" @@ -51,9 +55,9 @@ "url": "https://github.com/sindresorhus/ansi-regex/issues" }, "homepage": "https://github.com/sindresorhus/ansi-regex", - "_id": "ansi-regex@0.1.0", - "_shasum": "55ca60db6900857c423ae9297980026f941ed903", - "_from": "ansi-regex@^0.1.0", + "_id": "ansi-regex@0.2.1", + "_shasum": "0d8e946967a3d8143f93e24e298525fc1b2235f9", + "_from": "ansi-regex@^0.2.1", "_npmVersion": "1.4.9", "_npmUser": { "name": "sindresorhus", @@ -66,10 +70,10 @@ } ], "dist": { - "shasum": "55ca60db6900857c423ae9297980026f941ed903", - "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-0.1.0.tgz" + "shasum": "0d8e946967a3d8143f93e24e298525fc1b2235f9", + "tarball": "http://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.1.0.tgz", + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-0.2.1.tgz", "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md index 72c248cd73..ae876e7292 100644 --- a/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/node_modules/ansi-regex/readme.md @@ -15,13 +15,18 @@ $ npm install --save ansi-regex ```js var ansiRegex = require('ansi-regex'); -ansiRegex.test('\x1b[4mcake\x1b[0m'); +ansiRegex().test('\u001b[4mcake\u001b[0m'); //=> true -ansiRegex.test('cake'); +ansiRegex().test('cake'); //=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] ``` +*It's a function so you can create multiple instances. Regexes with the global flag will have the `.lastIndex` property changed for each call to methods on the instance. Therefore reusing the instance with multiple calls will not work as expected for `.test()`.* + ## License 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 ea6a22fe21..0fd180b6f2 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,6 +1,6 @@ { "name": "strip-ansi", - "version": "0.2.2", + "version": "1.0.0", "description": "Strip ANSI escape codes", "license": "MIT", "bin": { @@ -51,19 +51,20 @@ "text" ], "dependencies": { - "ansi-regex": "^0.1.0" + "ansi-regex": "^0.2.1" }, "devDependencies": { "mocha": "*" }, + "gitHead": "6fea2ef935f1ba10d43e4c4d9814af328803935c", "bugs": { "url": "https://github.com/sindresorhus/strip-ansi/issues" }, "homepage": "https://github.com/sindresorhus/strip-ansi", - "_id": "strip-ansi@0.2.2", - "_shasum": "854d290c981525fc8c397a910b025ae2d54ffc08", - "_from": "strip-ansi@^0.2.1", - "_npmVersion": "1.4.9", + "_id": "strip-ansi@1.0.0", + "_shasum": "6c021321d6ece161a3c608fbab268c7328901c73", + "_from": "strip-ansi@^1.0.0", + "_npmVersion": "1.4.14", "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" @@ -72,13 +73,17 @@ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" + }, + { + "name": "jbnicolai", + "email": "jappelman@xebia.com" } ], "dist": { - "shasum": "854d290c981525fc8c397a910b025ae2d54ffc08", - "tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-0.2.2.tgz" + "shasum": "6c021321d6ece161a3c608fbab268c7328901c73", + "tarball": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-1.0.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.2.2.tgz", + "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-1.0.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/INSTALL.md b/deps/npm/node_modules/columnify/node_modules/wcwidth.js/INSTALL.md deleted file mode 100644 index e4eafaff71..0000000000 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/INSTALL.md +++ /dev/null @@ -1,12 +0,0 @@ -How To Build and Install wcwidth.js -=================================== - -This package does not provide an automated way to build or install the library -except using [`npm`](http://npmjs.org/package/wcwidth.js) because wcwidth.js is -intended to runs on top of [`node.js`](http://nodejs.org) that is a javascript -interpreter. If you have `node.js` installed, - - npm install wcwidth.js - -brings the latest version of `wcwidth.js` and installs it with its all -depending packages. diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/NEWS b/deps/npm/node_modules/columnify/node_modules/wcwidth.js/NEWS deleted file mode 100644 index cf80fbc1c9..0000000000 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/NEWS +++ /dev/null @@ -1,9 +0,0 @@ -What's New in wcwidth.js? -========================= - -2014-04-26 0.0.4 released. -2012-12-13 0.0.3 released. -2012-12-12 Moved the repository to git/github. -2012-10-16 0.0.2 released. -2012-10-16 Using `wcwidth' without invoking it checked. -2012-10-12 First release. diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/README.md b/deps/npm/node_modules/columnify/node_modules/wcwidth.js/README.md deleted file mode 100644 index 6c562cff58..0000000000 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/README.md +++ /dev/null @@ -1,65 +0,0 @@ -wcwidth.js: A JavaScript Porting of Markus Kuhn's wcwidth() Implementation -========================================================================== - -`wcwidth.js` is a simple JavaScript porting of `wcwidth()` implemented in C -[by Markus Kuhn](http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c). - -`wcwidth()` and its string version, `wcswidth()` are defined by IEEE Std -1002.1-2001, a.k.a. POSIX.1-2001, and return the number of columns used to -represent the given wide character and string. Markus's implementation assumes -the wide character given to those functions to be encoded in ISO 10646, which -is almost true for JavaScript's characters. - -For convenience, `wcwidth.js` sets the getter of the property named `wcwidth` -for the string type. You don't need to invoke a function to get the width of -strings, but inspecting the `wcwidth` property is enough. The following code -snippet shows how to use `wcwidth.js`: - - var wcwidth = require('wcwidth')({ - nul: 0, - control: -1, - monkeypatch: true - }); // equivalent to var wcwidth = require('wcwidth')(); - - console.log("한글".wcwidth); // prints 4 - console.log("\0".wcwidth); // prints 0 - console.log("\t".wcwidth); // prints -1 - -The argument `{ nul: 0, control: -1, monkeypatch: true }` (which are the -default values, in fact) tells `wcwidth.js` to return 0 for the NUL character -and -1 for non-printable control characters. Setting a negative value to `nul` -or `control` makes the `wcwidth` property set to -1 for any string that -contains NUL or control characters respectively. If you plan to replace each -control character with, say, `???` when printing, you can 'require' -`wcwidth.js` as follows: - - var wcwidth = require('wcwidth')({ - control: 3 - }); // leaving nul as 0 - - console.log("\t".wcwidth); // prints 3 - console.log("\0".wcwidth); // prints 0 - -The last option `monkeypatch` allows `wcwidth.js` to monkey-patch -`String.prototype` to provide the getter `wcwidth`. Even if it is convenient to -have a getter that looks like the native one, it is sometimes unwanted as -adding a getter into `String.prototype` may break node.js's module system; you -are not guaranteed to have the version your code `require`s through the getter -if other modules you're using also depend on other versions of `wcwidth.js` -(thanks to [timoxley](https://github.com/timoxley) for the information). By -setting `monkeypatch` to `false`, `wcwidth.js` touches no global object and -provides no getter but a callable method explained below. - -`wcwidth.js` also provides a method. Since JavaScript has no character type, -it is meaningless to have two versions while POSIX does for C. The method also -accepts a code value that can be obtained by the `charCodeAt()` method. - - console.log(wcwidth('한')); // prints 2 - console.log(wcwidth('글'.charCodeAt(0)); // prints 2 - console.log(wcwidth('한글')); // prints 4 - -`INSTALL.md` explains how to build and install the library. For the copyright -issues, see the accompanying `LICENSE.md` file. - -If you have a question or suggestion, do not hesitate to contact me via email -(woong.jun at gmail.com) or web (http://code.woong.org/). diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/README.md b/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/README.md deleted file mode 100644 index c2ba2590c6..0000000000 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/README.md +++ /dev/null @@ -1,22 +0,0 @@ - __ - /\ \ __ - __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____ - /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\ - \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\ - \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/ - \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/ - \ \____/ - \/___/ - -Underscore.js is a utility-belt library for JavaScript that provides -support for the usual functional suspects (each, map, reduce, filter...) -without extending any core JavaScript objects. - -For Docs, License, Tests, and pre-packed downloads, see: -http://underscorejs.org - -Underscore is an open-sourced component of DocumentCloud: -https://github.com/documentcloud - -Many thanks to our contributors: -https://github.com/jashkenas/underscore/contributors diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/package.json b/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/package.json deleted file mode 100644 index 49e9145c99..0000000000 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "underscore", - "description": "JavaScript's functional programming helper library.", - "homepage": "http://underscorejs.org", - "keywords": [ - "util", - "functional", - "server", - "client", - "browser" - ], - "author": { - "name": "Jeremy Ashkenas", - "email": "jeremy@documentcloud.org" - }, - "repository": { - "type": "git", - "url": "git://github.com/jashkenas/underscore.git" - }, - "main": "underscore.js", - "version": "1.6.0", - "devDependencies": { - "docco": "0.6.x", - "phantomjs": "1.9.0-1", - "uglify-js": "2.4.x" - }, - "scripts": { - "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true", - "build": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m --source-map underscore-min.map -o underscore-min.js", - "doc": "docco underscore.js" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/jashkenas/underscore/master/LICENSE" - } - ], - "files": [ - "underscore.js", - "underscore-min.js", - "LICENSE" - ], - "bugs": { - "url": "https://github.com/jashkenas/underscore/issues" - }, - "_id": "underscore@1.6.0", - "dist": { - "shasum": "8b38b10cacdef63337b8b24e4ff86d45aea529a8", - "tarball": "http://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz" - }, - "_from": "underscore@>= 1.3.0", - "_npmVersion": "1.3.21", - "_npmUser": { - "name": "jashkenas", - "email": "jashkenas@gmail.com" - }, - "maintainers": [ - { - "name": "jashkenas", - "email": "jashkenas@gmail.com" - } - ], - "directories": {}, - "_shasum": "8b38b10cacdef63337b8b24e4ff86d45aea529a8", - "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/underscore-min.js b/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/underscore-min.js deleted file mode 100644 index 3434d6c590..0000000000 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/underscore-min.js +++ /dev/null @@ -1,6 +0,0 @@ -// Underscore.js 1.6.0 -// http://underscorejs.org -// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. -(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,w=Object.keys,_=i.bind,j=function(n){return n instanceof j?n:this instanceof j?void(this._wrapped=n):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,j.VERSION="1.6.0";var A=j.each=j.forEach=function(n,t,e){if(null==n)return n;if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a=j.keys(n),u=0,i=a.length;i>u;u++)if(t.call(e,n[a[u]],a[u],n)===r)return;return n};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var O="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},j.find=j.detect=function(n,t,r){var e;return k(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var k=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:k(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,t){return j.map(n,j.property(t))},j.where=function(n,t){return j.filter(n,j.matches(t))},j.findWhere=function(n,t){return j.find(n,j.matches(t))},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);var e=-1/0,u=-1/0;return A(n,function(n,i,a){var o=t?t.call(r,n,i,a):n;o>u&&(e=n,u=o)}),e},j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);var e=1/0,u=1/0;return A(n,function(n,i,a){var o=t?t.call(r,n,i,a):n;u>o&&(e=n,u=o)}),e},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e},j.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=j.values(n)),n[j.random(n.length-1)]):j.shuffle(n).slice(0,Math.max(0,t))};var E=function(n){return null==n?j.identity:j.isFunction(n)?n:j.property(n)};j.sortBy=function(n,t,r){return t=E(t),j.pluck(j.map(n,function(n,e,u){return{value:n,index:e,criteria:t.call(r,n,e,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=E(r),A(t,function(i,a){var o=r.call(e,i,a,t);n(u,o,i)}),u}};j.groupBy=F(function(n,t,r){j.has(n,t)?n[t].push(r):n[t]=[r]}),j.indexBy=F(function(n,t,r){n[t]=r}),j.countBy=F(function(n,t){j.has(n,t)?n[t]++:n[t]=1}),j.sortedIndex=function(n,t,r,e){r=E(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])t?[]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var M=function(n,t,r){return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||j.isArguments(n)?t?a.apply(r,n):M(n,t,r):r.push(n)}),r)};j.flatten=function(n,t){return M(n,t,[])},j.without=function(n){return j.difference(n,o.call(arguments,1))},j.partition=function(n,t){var r=[],e=[];return A(n,function(n){(t(n)?r:e).push(n)}),[r,e]},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},j.union=function(){return j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.contains(t,n)})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var R=function(){};j.bind=function(n,t){var r,e;if(_&&n.bind===_)return _.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var u=new R;R.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===j&&(e[u]=arguments[r++]);for(;r=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u),e=u=null):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u,i,a,o,c=function(){var l=j.now()-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u),i=u=null))};return function(){i=this,u=arguments,a=j.now();var l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u),i=u=null),o}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return j.partial(t,n)},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=function(n){if(!j.isObject(n))return[];if(w)return w(n);var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},j.pairs=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},j.invert=function(n){for(var t={},r=j.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o)&&"constructor"in n&&"constructor"in t)return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.constant=function(n){return function(){return n}},j.property=function(n){return function(t){return t[n]}},j.matches=function(n){return function(t){if(t===n)return!0;for(var r in n)if(n[r]!==t[r])return!1;return!0}},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},j.now=Date.now||function(){return(new Date).getTime()};var T={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};T.unescape=j.invert(T.escape);var I={escape:new RegExp("["+j.keys(T.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(T.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(I[n],function(t){return T[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return j})}).call(this); -//# sourceMappingURL=underscore-min.map \ No newline at end of file diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/underscore.js b/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/underscore.js deleted file mode 100644 index 9a4cabecf7..0000000000 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/node_modules/underscore/underscore.js +++ /dev/null @@ -1,1343 +0,0 @@ -// Underscore.js 1.6.0 -// http://underscorejs.org -// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. - -(function() { - - // Baseline setup - // -------------- - - // Establish the root object, `window` in the browser, or `exports` on the server. - var root = this; - - // Save the previous value of the `_` variable. - var previousUnderscore = root._; - - // Establish the object that gets returned to break out of a loop iteration. - var breaker = {}; - - // Save bytes in the minified (but not gzipped) version: - var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; - - // Create quick reference variables for speed access to core prototypes. - var - push = ArrayProto.push, - slice = ArrayProto.slice, - concat = ArrayProto.concat, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - - // All **ECMAScript 5** native function implementations that we hope to use - // are declared here. - var - nativeForEach = ArrayProto.forEach, - nativeMap = ArrayProto.map, - nativeReduce = ArrayProto.reduce, - nativeReduceRight = ArrayProto.reduceRight, - nativeFilter = ArrayProto.filter, - nativeEvery = ArrayProto.every, - nativeSome = ArrayProto.some, - nativeIndexOf = ArrayProto.indexOf, - nativeLastIndexOf = ArrayProto.lastIndexOf, - nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeBind = FuncProto.bind; - - // Create a safe reference to the Underscore object for use below. - var _ = function(obj) { - if (obj instanceof _) return obj; - if (!(this instanceof _)) return new _(obj); - this._wrapped = obj; - }; - - // Export the Underscore object for **Node.js**, with - // backwards-compatibility for the old `require()` API. If we're in - // the browser, add `_` as a global object via a string identifier, - // for Closure Compiler "advanced" mode. - if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - exports = module.exports = _; - } - exports._ = _; - } else { - root._ = _; - } - - // Current version. - _.VERSION = '1.6.0'; - - // Collection Functions - // -------------------- - - // The cornerstone, an `each` implementation, aka `forEach`. - // Handles objects with the built-in `forEach`, arrays, and raw objects. - // Delegates to **ECMAScript 5**'s native `forEach` if available. - var each = _.each = _.forEach = function(obj, iterator, context) { - if (obj == null) return obj; - if (nativeForEach && obj.forEach === nativeForEach) { - obj.forEach(iterator, context); - } else if (obj.length === +obj.length) { - for (var i = 0, length = obj.length; i < length; i++) { - if (iterator.call(context, obj[i], i, obj) === breaker) return; - } - } else { - var keys = _.keys(obj); - for (var i = 0, length = keys.length; i < length; i++) { - if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return; - } - } - return obj; - }; - - // Return the results of applying the iterator to each element. - // Delegates to **ECMAScript 5**'s native `map` if available. - _.map = _.collect = function(obj, iterator, context) { - var results = []; - if (obj == null) return results; - if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context); - each(obj, function(value, index, list) { - results.push(iterator.call(context, value, index, list)); - }); - return results; - }; - - var reduceError = 'Reduce of empty array with no initial value'; - - // **Reduce** builds up a single result from a list of values, aka `inject`, - // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available. - _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) { - var initial = arguments.length > 2; - if (obj == null) obj = []; - if (nativeReduce && obj.reduce === nativeReduce) { - if (context) iterator = _.bind(iterator, context); - return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator); - } - each(obj, function(value, index, list) { - if (!initial) { - memo = value; - initial = true; - } else { - memo = iterator.call(context, memo, value, index, list); - } - }); - if (!initial) throw new TypeError(reduceError); - return memo; - }; - - // The right-associative version of reduce, also known as `foldr`. - // Delegates to **ECMAScript 5**'s native `reduceRight` if available. - _.reduceRight = _.foldr = function(obj, iterator, memo, context) { - var initial = arguments.length > 2; - if (obj == null) obj = []; - if (nativeReduceRight && obj.reduceRight === nativeReduceRight) { - if (context) iterator = _.bind(iterator, context); - return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator); - } - var length = obj.length; - if (length !== +length) { - var keys = _.keys(obj); - length = keys.length; - } - each(obj, function(value, index, list) { - index = keys ? keys[--length] : --length; - if (!initial) { - memo = obj[index]; - initial = true; - } else { - memo = iterator.call(context, memo, obj[index], index, list); - } - }); - if (!initial) throw new TypeError(reduceError); - return memo; - }; - - // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, predicate, context) { - var result; - any(obj, function(value, index, list) { - if (predicate.call(context, value, index, list)) { - result = value; - return true; - } - }); - return result; - }; - - // Return all the elements that pass a truth test. - // Delegates to **ECMAScript 5**'s native `filter` if available. - // Aliased as `select`. - _.filter = _.select = function(obj, predicate, context) { - var results = []; - if (obj == null) return results; - if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context); - each(obj, function(value, index, list) { - if (predicate.call(context, value, index, list)) results.push(value); - }); - return results; - }; - - // Return all the elements for which a truth test fails. - _.reject = function(obj, predicate, context) { - return _.filter(obj, function(value, index, list) { - return !predicate.call(context, value, index, list); - }, context); - }; - - // Determine whether all of the elements match a truth test. - // Delegates to **ECMAScript 5**'s native `every` if available. - // Aliased as `all`. - _.every = _.all = function(obj, predicate, context) { - predicate || (predicate = _.identity); - var result = true; - if (obj == null) return result; - if (nativeEvery && obj.every === nativeEvery) return obj.every(predicate, context); - each(obj, function(value, index, list) { - if (!(result = result && predicate.call(context, value, index, list))) return breaker; - }); - return !!result; - }; - - // Determine if at least one element in the object matches a truth test. - // Delegates to **ECMAScript 5**'s native `some` if available. - // Aliased as `any`. - var any = _.some = _.any = function(obj, predicate, context) { - predicate || (predicate = _.identity); - var result = false; - if (obj == null) return result; - if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context); - each(obj, function(value, index, list) { - if (result || (result = predicate.call(context, value, index, list))) return breaker; - }); - return !!result; - }; - - // Determine if the array or object contains a given value (using `===`). - // Aliased as `include`. - _.contains = _.include = function(obj, target) { - if (obj == null) return false; - if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1; - return any(obj, function(value) { - return value === target; - }); - }; - - // Invoke a method (with arguments) on every item in a collection. - _.invoke = function(obj, method) { - var args = slice.call(arguments, 2); - var isFunc = _.isFunction(method); - return _.map(obj, function(value) { - return (isFunc ? method : value[method]).apply(value, args); - }); - }; - - // Convenience version of a common use case of `map`: fetching a property. - _.pluck = function(obj, key) { - return _.map(obj, _.property(key)); - }; - - // Convenience version of a common use case of `filter`: selecting only objects - // containing specific `key:value` pairs. - _.where = function(obj, attrs) { - return _.filter(obj, _.matches(attrs)); - }; - - // Convenience version of a common use case of `find`: getting the first object - // containing specific `key:value` pairs. - _.findWhere = function(obj, attrs) { - return _.find(obj, _.matches(attrs)); - }; - - // Return the maximum element or (element-based computation). - // Can't optimize arrays of integers longer than 65,535 elements. - // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797) - _.max = function(obj, iterator, context) { - if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { - return Math.max.apply(Math, obj); - } - var result = -Infinity, lastComputed = -Infinity; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - if (computed > lastComputed) { - result = value; - lastComputed = computed; - } - }); - return result; - }; - - // Return the minimum element (or element-based computation). - _.min = function(obj, iterator, context) { - if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) { - return Math.min.apply(Math, obj); - } - var result = Infinity, lastComputed = Infinity; - each(obj, function(value, index, list) { - var computed = iterator ? iterator.call(context, value, index, list) : value; - if (computed < lastComputed) { - result = value; - lastComputed = computed; - } - }); - return result; - }; - - // Shuffle an array, using the modern version of the - // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). - _.shuffle = function(obj) { - var rand; - var index = 0; - var shuffled = []; - each(obj, function(value) { - rand = _.random(index++); - shuffled[index - 1] = shuffled[rand]; - shuffled[rand] = value; - }); - return shuffled; - }; - - // Sample **n** random values from a collection. - // If **n** is not specified, returns a single random element. - // The internal `guard` argument allows it to work with `map`. - _.sample = function(obj, n, guard) { - if (n == null || guard) { - if (obj.length !== +obj.length) obj = _.values(obj); - return obj[_.random(obj.length - 1)]; - } - return _.shuffle(obj).slice(0, Math.max(0, n)); - }; - - // An internal function to generate lookup iterators. - var lookupIterator = function(value) { - if (value == null) return _.identity; - if (_.isFunction(value)) return value; - return _.property(value); - }; - - // Sort the object's values by a criterion produced by an iterator. - _.sortBy = function(obj, iterator, context) { - iterator = lookupIterator(iterator); - return _.pluck(_.map(obj, function(value, index, list) { - return { - value: value, - index: index, - criteria: iterator.call(context, value, index, list) - }; - }).sort(function(left, right) { - var a = left.criteria; - var b = right.criteria; - if (a !== b) { - if (a > b || a === void 0) return 1; - if (a < b || b === void 0) return -1; - } - return left.index - right.index; - }), 'value'); - }; - - // An internal function used for aggregate "group by" operations. - var group = function(behavior) { - return function(obj, iterator, context) { - var result = {}; - iterator = lookupIterator(iterator); - each(obj, function(value, index) { - var key = iterator.call(context, value, index, obj); - behavior(result, key, value); - }); - return result; - }; - }; - - // Groups the object's values by a criterion. Pass either a string attribute - // to group by, or a function that returns the criterion. - _.groupBy = group(function(result, key, value) { - _.has(result, key) ? result[key].push(value) : result[key] = [value]; - }); - - // Indexes the object's values by a criterion, similar to `groupBy`, but for - // when you know that your index values will be unique. - _.indexBy = group(function(result, key, value) { - result[key] = value; - }); - - // Counts instances of an object that group by a certain criterion. Pass - // either a string attribute to count by, or a function that returns the - // criterion. - _.countBy = group(function(result, key) { - _.has(result, key) ? result[key]++ : result[key] = 1; - }); - - // Use a comparator function to figure out the smallest index at which - // an object should be inserted so as to maintain order. Uses binary search. - _.sortedIndex = function(array, obj, iterator, context) { - iterator = lookupIterator(iterator); - var value = iterator.call(context, obj); - var low = 0, high = array.length; - while (low < high) { - var mid = (low + high) >>> 1; - iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid; - } - return low; - }; - - // Safely create a real, live array from anything iterable. - _.toArray = function(obj) { - if (!obj) return []; - if (_.isArray(obj)) return slice.call(obj); - if (obj.length === +obj.length) return _.map(obj, _.identity); - return _.values(obj); - }; - - // Return the number of elements in an object. - _.size = function(obj) { - if (obj == null) return 0; - return (obj.length === +obj.length) ? obj.length : _.keys(obj).length; - }; - - // Array Functions - // --------------- - - // Get the first element of an array. Passing **n** will return the first N - // values in the array. Aliased as `head` and `take`. The **guard** check - // allows it to work with `_.map`. - _.first = _.head = _.take = function(array, n, guard) { - if (array == null) return void 0; - if ((n == null) || guard) return array[0]; - if (n < 0) return []; - return slice.call(array, 0, n); - }; - - // Returns everything but the last entry of the array. Especially useful on - // the arguments object. Passing **n** will return all the values in - // the array, excluding the last N. The **guard** check allows it to work with - // `_.map`. - _.initial = function(array, n, guard) { - return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n)); - }; - - // Get the last element of an array. Passing **n** will return the last N - // values in the array. The **guard** check allows it to work with `_.map`. - _.last = function(array, n, guard) { - if (array == null) return void 0; - if ((n == null) || guard) return array[array.length - 1]; - return slice.call(array, Math.max(array.length - n, 0)); - }; - - // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. - // Especially useful on the arguments object. Passing an **n** will return - // the rest N values in the array. The **guard** - // check allows it to work with `_.map`. - _.rest = _.tail = _.drop = function(array, n, guard) { - return slice.call(array, (n == null) || guard ? 1 : n); - }; - - // Trim out all falsy values from an array. - _.compact = function(array) { - return _.filter(array, _.identity); - }; - - // Internal implementation of a recursive `flatten` function. - var flatten = function(input, shallow, output) { - if (shallow && _.every(input, _.isArray)) { - return concat.apply(output, input); - } - each(input, function(value) { - if (_.isArray(value) || _.isArguments(value)) { - shallow ? push.apply(output, value) : flatten(value, shallow, output); - } else { - output.push(value); - } - }); - return output; - }; - - // Flatten out an array, either recursively (by default), or just one level. - _.flatten = function(array, shallow) { - return flatten(array, shallow, []); - }; - - // Return a version of the array that does not contain the specified value(s). - _.without = function(array) { - return _.difference(array, slice.call(arguments, 1)); - }; - - // Split an array into two arrays: one whose elements all satisfy the given - // predicate, and one whose elements all do not satisfy the predicate. - _.partition = function(array, predicate) { - var pass = [], fail = []; - each(array, function(elem) { - (predicate(elem) ? pass : fail).push(elem); - }); - return [pass, fail]; - }; - - // Produce a duplicate-free version of the array. If the array has already - // been sorted, you have the option of using a faster algorithm. - // Aliased as `unique`. - _.uniq = _.unique = function(array, isSorted, iterator, context) { - if (_.isFunction(isSorted)) { - context = iterator; - iterator = isSorted; - isSorted = false; - } - var initial = iterator ? _.map(array, iterator, context) : array; - var results = []; - var seen = []; - each(initial, function(value, index) { - if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) { - seen.push(value); - results.push(array[index]); - } - }); - return results; - }; - - // Produce an array that contains the union: each distinct element from all of - // the passed-in arrays. - _.union = function() { - return _.uniq(_.flatten(arguments, true)); - }; - - // Produce an array that contains every item shared between all the - // passed-in arrays. - _.intersection = function(array) { - var rest = slice.call(arguments, 1); - return _.filter(_.uniq(array), function(item) { - return _.every(rest, function(other) { - return _.contains(other, item); - }); - }); - }; - - // Take the difference between one array and a number of other arrays. - // Only the elements present in just the first array will remain. - _.difference = function(array) { - var rest = concat.apply(ArrayProto, slice.call(arguments, 1)); - return _.filter(array, function(value){ return !_.contains(rest, value); }); - }; - - // Zip together multiple lists into a single array -- elements that share - // an index go together. - _.zip = function() { - var length = _.max(_.pluck(arguments, 'length').concat(0)); - var results = new Array(length); - for (var i = 0; i < length; i++) { - results[i] = _.pluck(arguments, '' + i); - } - return results; - }; - - // Converts lists into objects. Pass either a single array of `[key, value]` - // pairs, or two parallel arrays of the same length -- one of keys, and one of - // the corresponding values. - _.object = function(list, values) { - if (list == null) return {}; - var result = {}; - for (var i = 0, length = list.length; i < length; i++) { - if (values) { - result[list[i]] = values[i]; - } else { - result[list[i][0]] = list[i][1]; - } - } - return result; - }; - - // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**), - // we need this function. Return the position of the first occurrence of an - // item in an array, or -1 if the item is not included in the array. - // Delegates to **ECMAScript 5**'s native `indexOf` if available. - // If the array is large and already in sort order, pass `true` - // for **isSorted** to use binary search. - _.indexOf = function(array, item, isSorted) { - if (array == null) return -1; - var i = 0, length = array.length; - if (isSorted) { - if (typeof isSorted == 'number') { - i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted); - } else { - i = _.sortedIndex(array, item); - return array[i] === item ? i : -1; - } - } - if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted); - for (; i < length; i++) if (array[i] === item) return i; - return -1; - }; - - // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available. - _.lastIndexOf = function(array, item, from) { - if (array == null) return -1; - var hasIndex = from != null; - if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) { - return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item); - } - var i = (hasIndex ? from : array.length); - while (i--) if (array[i] === item) return i; - return -1; - }; - - // Generate an integer Array containing an arithmetic progression. A port of - // the native Python `range()` function. See - // [the Python documentation](http://docs.python.org/library/functions.html#range). - _.range = function(start, stop, step) { - if (arguments.length <= 1) { - stop = start || 0; - start = 0; - } - step = arguments[2] || 1; - - var length = Math.max(Math.ceil((stop - start) / step), 0); - var idx = 0; - var range = new Array(length); - - while(idx < length) { - range[idx++] = start; - start += step; - } - - return range; - }; - - // Function (ahem) Functions - // ------------------ - - // Reusable constructor function for prototype setting. - var ctor = function(){}; - - // Create a function bound to a given object (assigning `this`, and arguments, - // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if - // available. - _.bind = function(func, context) { - var args, bound; - if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - if (!_.isFunction(func)) throw new TypeError; - args = slice.call(arguments, 2); - return bound = function() { - if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments))); - ctor.prototype = func.prototype; - var self = new ctor; - ctor.prototype = null; - var result = func.apply(self, args.concat(slice.call(arguments))); - if (Object(result) === result) return result; - return self; - }; - }; - - // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. _ acts - // as a placeholder, allowing any combination of arguments to be pre-filled. - _.partial = function(func) { - var boundArgs = slice.call(arguments, 1); - return function() { - var position = 0; - var args = boundArgs.slice(); - for (var i = 0, length = args.length; i < length; i++) { - if (args[i] === _) args[i] = arguments[position++]; - } - while (position < arguments.length) args.push(arguments[position++]); - return func.apply(this, args); - }; - }; - - // Bind a number of an object's methods to that object. Remaining arguments - // are the method names to be bound. Useful for ensuring that all callbacks - // defined on an object belong to it. - _.bindAll = function(obj) { - var funcs = slice.call(arguments, 1); - if (funcs.length === 0) throw new Error('bindAll must be passed function names'); - each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); }); - return obj; - }; - - // Memoize an expensive function by storing its results. - _.memoize = function(func, hasher) { - var memo = {}; - hasher || (hasher = _.identity); - return function() { - var key = hasher.apply(this, arguments); - return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments)); - }; - }; - - // Delays a function for the given number of milliseconds, and then calls - // it with the arguments supplied. - _.delay = function(func, wait) { - var args = slice.call(arguments, 2); - return setTimeout(function(){ return func.apply(null, args); }, wait); - }; - - // Defers a function, scheduling it to run after the current call stack has - // cleared. - _.defer = function(func) { - return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1))); - }; - - // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. Normally, the throttled function will run - // as much as it can, without ever going more than once per `wait` duration; - // but if you'd like to disable the execution on the leading edge, pass - // `{leading: false}`. To disable execution on the trailing edge, ditto. - _.throttle = function(func, wait, options) { - var context, args, result; - var timeout = null; - var previous = 0; - options || (options = {}); - var later = function() { - previous = options.leading === false ? 0 : _.now(); - timeout = null; - result = func.apply(context, args); - context = args = null; - }; - return function() { - var now = _.now(); - if (!previous && options.leading === false) previous = now; - var remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0) { - clearTimeout(timeout); - timeout = null; - previous = now; - result = func.apply(context, args); - context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; - }; - - // Returns a function, that, as long as it continues to be invoked, will not - // be triggered. The function will be called after it stops being called for - // N milliseconds. If `immediate` is passed, trigger the function on the - // leading edge, instead of the trailing. - _.debounce = function(func, wait, immediate) { - var timeout, args, context, timestamp, result; - - var later = function() { - var last = _.now() - timestamp; - if (last < wait) { - timeout = setTimeout(later, wait - last); - } else { - timeout = null; - if (!immediate) { - result = func.apply(context, args); - context = args = null; - } - } - }; - - return function() { - context = this; - args = arguments; - timestamp = _.now(); - var callNow = immediate && !timeout; - if (!timeout) { - timeout = setTimeout(later, wait); - } - if (callNow) { - result = func.apply(context, args); - context = args = null; - } - - return result; - }; - }; - - // Returns a function that will be executed at most one time, no matter how - // often you call it. Useful for lazy initialization. - _.once = function(func) { - var ran = false, memo; - return function() { - if (ran) return memo; - ran = true; - memo = func.apply(this, arguments); - func = null; - return memo; - }; - }; - - // Returns the first function passed as an argument to the second, - // allowing you to adjust arguments, run code before and after, and - // conditionally execute the original function. - _.wrap = function(func, wrapper) { - return _.partial(wrapper, func); - }; - - // Returns a function that is the composition of a list of functions, each - // consuming the return value of the function that follows. - _.compose = function() { - var funcs = arguments; - return function() { - var args = arguments; - for (var i = funcs.length - 1; i >= 0; i--) { - args = [funcs[i].apply(this, args)]; - } - return args[0]; - }; - }; - - // Returns a function that will only be executed after being called N times. - _.after = function(times, func) { - return function() { - if (--times < 1) { - return func.apply(this, arguments); - } - }; - }; - - // Object Functions - // ---------------- - - // Retrieve the names of an object's properties. - // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = function(obj) { - if (!_.isObject(obj)) return []; - if (nativeKeys) return nativeKeys(obj); - var keys = []; - for (var key in obj) if (_.has(obj, key)) keys.push(key); - return keys; - }; - - // Retrieve the values of an object's properties. - _.values = function(obj) { - var keys = _.keys(obj); - var length = keys.length; - var values = new Array(length); - for (var i = 0; i < length; i++) { - values[i] = obj[keys[i]]; - } - return values; - }; - - // Convert an object into a list of `[key, value]` pairs. - _.pairs = function(obj) { - var keys = _.keys(obj); - var length = keys.length; - var pairs = new Array(length); - for (var i = 0; i < length; i++) { - pairs[i] = [keys[i], obj[keys[i]]]; - } - return pairs; - }; - - // Invert the keys and values of an object. The values must be serializable. - _.invert = function(obj) { - var result = {}; - var keys = _.keys(obj); - for (var i = 0, length = keys.length; i < length; i++) { - result[obj[keys[i]]] = keys[i]; - } - return result; - }; - - // Return a sorted list of the function names available on the object. - // Aliased as `methods` - _.functions = _.methods = function(obj) { - var names = []; - for (var key in obj) { - if (_.isFunction(obj[key])) names.push(key); - } - return names.sort(); - }; - - // Extend a given object with all the properties in passed-in object(s). - _.extend = function(obj) { - each(slice.call(arguments, 1), function(source) { - if (source) { - for (var prop in source) { - obj[prop] = source[prop]; - } - } - }); - return obj; - }; - - // Return a copy of the object only containing the whitelisted properties. - _.pick = function(obj) { - var copy = {}; - var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); - each(keys, function(key) { - if (key in obj) copy[key] = obj[key]; - }); - return copy; - }; - - // Return a copy of the object without the blacklisted properties. - _.omit = function(obj) { - var copy = {}; - var keys = concat.apply(ArrayProto, slice.call(arguments, 1)); - for (var key in obj) { - if (!_.contains(keys, key)) copy[key] = obj[key]; - } - return copy; - }; - - // Fill in a given object with default properties. - _.defaults = function(obj) { - each(slice.call(arguments, 1), function(source) { - if (source) { - for (var prop in source) { - if (obj[prop] === void 0) obj[prop] = source[prop]; - } - } - }); - return obj; - }; - - // Create a (shallow-cloned) duplicate of an object. - _.clone = function(obj) { - if (!_.isObject(obj)) return obj; - return _.isArray(obj) ? obj.slice() : _.extend({}, obj); - }; - - // Invokes interceptor with the obj, and then returns obj. - // The primary purpose of this method is to "tap into" a method chain, in - // order to perform operations on intermediate results within the chain. - _.tap = function(obj, interceptor) { - interceptor(obj); - return obj; - }; - - // Internal recursive comparison function for `isEqual`. - var eq = function(a, b, aStack, bStack) { - // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). - if (a === b) return a !== 0 || 1 / a == 1 / b; - // A strict comparison is necessary because `null == undefined`. - if (a == null || b == null) return a === b; - // Unwrap any wrapped objects. - if (a instanceof _) a = a._wrapped; - if (b instanceof _) b = b._wrapped; - // Compare `[[Class]]` names. - var className = toString.call(a); - if (className != toString.call(b)) return false; - switch (className) { - // Strings, numbers, dates, and booleans are compared by value. - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return a == String(b); - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for - // other numeric values. - return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b); - case '[object Date]': - case '[object Boolean]': - // Coerce dates and booleans to numeric primitive values. Dates are compared by their - // millisecond representations. Note that invalid dates with millisecond representations - // of `NaN` are not equivalent. - return +a == +b; - // RegExps are compared by their source patterns and flags. - case '[object RegExp]': - return a.source == b.source && - a.global == b.global && - a.multiline == b.multiline && - a.ignoreCase == b.ignoreCase; - } - if (typeof a != 'object' || typeof b != 'object') return false; - // Assume equality for cyclic structures. The algorithm for detecting cyclic - // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. - var length = aStack.length; - while (length--) { - // Linear search. Performance is inversely proportional to the number of - // unique nested structures. - if (aStack[length] == a) return bStack[length] == b; - } - // Objects with different constructors are not equivalent, but `Object`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) && - _.isFunction(bCtor) && (bCtor instanceof bCtor)) - && ('constructor' in a && 'constructor' in b)) { - return false; - } - // Add the first object to the stack of traversed objects. - aStack.push(a); - bStack.push(b); - var size = 0, result = true; - // Recursively compare objects and arrays. - if (className == '[object Array]') { - // Compare array lengths to determine if a deep comparison is necessary. - size = a.length; - result = size == b.length; - if (result) { - // Deep compare the contents, ignoring non-numeric properties. - while (size--) { - if (!(result = eq(a[size], b[size], aStack, bStack))) break; - } - } - } else { - // Deep compare objects. - for (var key in a) { - if (_.has(a, key)) { - // Count the expected number of properties. - size++; - // Deep compare each member. - if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break; - } - } - // Ensure that both objects contain the same number of properties. - if (result) { - for (key in b) { - if (_.has(b, key) && !(size--)) break; - } - result = !size; - } - } - // Remove the first object from the stack of traversed objects. - aStack.pop(); - bStack.pop(); - return result; - }; - - // Perform a deep comparison to check if two objects are equal. - _.isEqual = function(a, b) { - return eq(a, b, [], []); - }; - - // Is a given array, string, or object empty? - // An "empty" object has no enumerable own-properties. - _.isEmpty = function(obj) { - if (obj == null) return true; - if (_.isArray(obj) || _.isString(obj)) return obj.length === 0; - for (var key in obj) if (_.has(obj, key)) return false; - return true; - }; - - // Is a given value a DOM element? - _.isElement = function(obj) { - return !!(obj && obj.nodeType === 1); - }; - - // Is a given value an array? - // Delegates to ECMA5's native Array.isArray - _.isArray = nativeIsArray || function(obj) { - return toString.call(obj) == '[object Array]'; - }; - - // Is a given variable an object? - _.isObject = function(obj) { - return obj === Object(obj); - }; - - // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp. - each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) { - _['is' + name] = function(obj) { - return toString.call(obj) == '[object ' + name + ']'; - }; - }); - - // Define a fallback version of the method in browsers (ahem, IE), where - // there isn't any inspectable "Arguments" type. - if (!_.isArguments(arguments)) { - _.isArguments = function(obj) { - return !!(obj && _.has(obj, 'callee')); - }; - } - - // Optimize `isFunction` if appropriate. - if (typeof (/./) !== 'function') { - _.isFunction = function(obj) { - return typeof obj === 'function'; - }; - } - - // Is a given object a finite number? - _.isFinite = function(obj) { - return isFinite(obj) && !isNaN(parseFloat(obj)); - }; - - // Is the given value `NaN`? (NaN is the only number which does not equal itself). - _.isNaN = function(obj) { - return _.isNumber(obj) && obj != +obj; - }; - - // Is a given value a boolean? - _.isBoolean = function(obj) { - return obj === true || obj === false || toString.call(obj) == '[object Boolean]'; - }; - - // Is a given value equal to null? - _.isNull = function(obj) { - return obj === null; - }; - - // Is a given variable undefined? - _.isUndefined = function(obj) { - return obj === void 0; - }; - - // Shortcut function for checking if an object has a given property directly - // on itself (in other words, not on a prototype). - _.has = function(obj, key) { - return hasOwnProperty.call(obj, key); - }; - - // Utility Functions - // ----------------- - - // Run Underscore.js in *noConflict* mode, returning the `_` variable to its - // previous owner. Returns a reference to the Underscore object. - _.noConflict = function() { - root._ = previousUnderscore; - return this; - }; - - // Keep the identity function around for default iterators. - _.identity = function(value) { - return value; - }; - - _.constant = function(value) { - return function () { - return value; - }; - }; - - _.property = function(key) { - return function(obj) { - return obj[key]; - }; - }; - - // Returns a predicate for checking whether an object has a given set of `key:value` pairs. - _.matches = function(attrs) { - return function(obj) { - if (obj === attrs) return true; //avoid comparing an object to itself. - for (var key in attrs) { - if (attrs[key] !== obj[key]) - return false; - } - return true; - } - }; - - // Run a function **n** times. - _.times = function(n, iterator, context) { - var accum = Array(Math.max(0, n)); - for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i); - return accum; - }; - - // Return a random integer between min and max (inclusive). - _.random = function(min, max) { - if (max == null) { - max = min; - min = 0; - } - return min + Math.floor(Math.random() * (max - min + 1)); - }; - - // A (possibly faster) way to get the current timestamp as an integer. - _.now = Date.now || function() { return new Date().getTime(); }; - - // List of HTML entities for escaping. - var entityMap = { - escape: { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - } - }; - entityMap.unescape = _.invert(entityMap.escape); - - // Regexes containing the keys and values listed immediately above. - var entityRegexes = { - escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'), - unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g') - }; - - // Functions for escaping and unescaping strings to/from HTML interpolation. - _.each(['escape', 'unescape'], function(method) { - _[method] = function(string) { - if (string == null) return ''; - return ('' + string).replace(entityRegexes[method], function(match) { - return entityMap[method][match]; - }); - }; - }); - - // If the value of the named `property` is a function then invoke it with the - // `object` as context; otherwise, return it. - _.result = function(object, property) { - if (object == null) return void 0; - var value = object[property]; - return _.isFunction(value) ? value.call(object) : value; - }; - - // Add your own custom functions to the Underscore object. - _.mixin = function(obj) { - each(_.functions(obj), function(name) { - var func = _[name] = obj[name]; - _.prototype[name] = function() { - var args = [this._wrapped]; - push.apply(args, arguments); - return result.call(this, func.apply(_, args)); - }; - }); - }; - - // Generate a unique integer id (unique within the entire client session). - // Useful for temporary DOM ids. - var idCounter = 0; - _.uniqueId = function(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; - }; - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(text, data, settings) { - var render; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function(match) { return '\\' + escapes[match]; }); - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; - - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - if (data) return render(data, _); - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; - - return template; - }; - - // Add a "chain" function, which will delegate to the wrapper. - _.chain = function(obj) { - return _(obj).chain(); - }; - - // OOP - // --------------- - // If Underscore is called as a function, it returns a wrapped object that - // can be used OO-style. This wrapper holds altered versions of all the - // underscore functions. Wrapped objects may be chained. - - // Helper function to continue chaining intermediate results. - var result = function(obj) { - return this._chain ? _(obj).chain() : obj; - }; - - // Add all of the Underscore functions to the wrapper object. - _.mixin(_); - - // Add all mutator Array functions to the wrapper. - each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - var obj = this._wrapped; - method.apply(obj, arguments); - if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0]; - return result.call(this, obj); - }; - }); - - // Add all accessor Array functions to the wrapper. - each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - return result.call(this, method.apply(this._wrapped, arguments)); - }; - }); - - _.extend(_.prototype, { - - // Start chaining a wrapped Underscore object. - chain: function() { - this._chain = true; - return this; - }, - - // Extracts the result from a wrapped and chained object. - value: function() { - return this._wrapped; - } - - }); - - // AMD registration happens at the end for compatibility with AMD loaders - // that may not enforce next-turn semantics on modules. Even though general - // practice for AMD registration is to be anonymous, underscore registers - // as a named module because, like jQuery, it is a base library that is - // popular enough to be bundled in a third party lib, but not be part of - // an AMD load request. Those cases could generate an error when an - // anonymous define() is called outside of a loader request. - if (typeof define === 'function' && define.amd) { - define('underscore', [], function() { - return _; - }); - } -}).call(this); diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/package.json b/deps/npm/node_modules/columnify/node_modules/wcwidth.js/package.json deleted file mode 100644 index 104b707632..0000000000 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "wcwidth.js", - "version": "0.0.4", - "description": "A JavaScript porting of C's wcwidth() and wcswidth()", - "author": { - "name": "Woong Jun", - "email": "woong.jun@gmail.com", - "url": "http://code.woong.org/" - }, - "contributors": [], - "homepage": "http://code.woong.org/wcwidth.js", - "repository": { - "type": "git", - "url": "https://github.com/mycoboco/wcwidth.js.git" - }, - "bugs": { - "url": "https://github.com/mycoboco/wcwidth.js/issues", - "email": "woong.jun@gmail.com" - }, - "main": "wcwidth.js", - "dependencies": { - "underscore": ">= 1.3.0" - }, - "devDependencies": {}, - "engines": { - "node": ">= 0.8.0" - }, - "licenses": "MIT", - "keywords": [ - "wide character", - "wc", - "wide character string", - "wcs", - "terminal", - "width", - "wcwidth", - "wcswidth" - ], - "_id": "wcwidth.js@0.0.4", - "dist": { - "shasum": "44298a7c899c17501990fdaddd76ef6bd081be75", - "tarball": "http://registry.npmjs.org/wcwidth.js/-/wcwidth.js-0.0.4.tgz" - }, - "_from": "wcwidth.js@~0.0.4", - "_npmVersion": "1.3.11", - "_npmUser": { - "name": "mycoboco", - "email": "woong.jun@gmail.com" - }, - "maintainers": [ - { - "name": "mycoboco", - "email": "woong.jun@gmail.com" - } - ], - "directories": {}, - "_shasum": "44298a7c899c17501990fdaddd76ef6bd081be75", - "_resolved": "https://registry.npmjs.org/wcwidth.js/-/wcwidth.js-0.0.4.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/wcwidth.js b/deps/npm/node_modules/columnify/node_modules/wcwidth.js/wcwidth.js deleted file mode 100644 index 3ce5b489a4..0000000000 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/wcwidth.js +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Javascript porting of Markus Kuhn's wcwidth() implementation - * - * The following explanation comes from the original C implementation: - * - * This is an implementation of wcwidth() and wcswidth() (defined in - * IEEE Std 1002.1-2001) for Unicode. - * - * http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html - * http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html - * - * In fixed-width output devices, Latin characters all occupy a single - * "cell" position of equal width, whereas ideographic CJK characters - * occupy two such cells. Interoperability between terminal-line - * applications and (teletype-style) character terminals using the - * UTF-8 encoding requires agreement on which character should advance - * the cursor by how many cell positions. No established formal - * standards exist at present on which Unicode character shall occupy - * how many cell positions on character terminals. These routines are - * a first attempt of defining such behavior based on simple rules - * applied to data provided by the Unicode Consortium. - * - * For some graphical characters, the Unicode standard explicitly - * defines a character-cell width via the definition of the East Asian - * FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes. - * In all these cases, there is no ambiguity about which width a - * terminal shall use. For characters in the East Asian Ambiguous (A) - * class, the width choice depends purely on a preference of backward - * compatibility with either historic CJK or Western practice. - * Choosing single-width for these characters is easy to justify as - * the appropriate long-term solution, as the CJK practice of - * displaying these characters as double-width comes from historic - * implementation simplicity (8-bit encoded characters were displayed - * single-width and 16-bit ones double-width, even for Greek, - * Cyrillic, etc.) and not any typographic considerations. - * - * Much less clear is the choice of width for the Not East Asian - * (Neutral) class. Existing practice does not dictate a width for any - * of these characters. It would nevertheless make sense - * typographically to allocate two character cells to characters such - * as for instance EM SPACE or VOLUME INTEGRAL, which cannot be - * represented adequately with a single-width glyph. The following - * routines at present merely assign a single-cell width to all - * neutral characters, in the interest of simplicity. This is not - * entirely satisfactory and should be reconsidered before - * establishing a formal standard in this area. At the moment, the - * decision which Not East Asian (Neutral) characters should be - * represented by double-width glyphs cannot yet be answered by - * applying a simple rule from the Unicode database content. Setting - * up a proper standard for the behavior of UTF-8 character terminals - * will require a careful analysis not only of each Unicode character, - * but also of each presentation form, something the author of these - * routines has avoided to do so far. - * - * http://www.unicode.org/unicode/reports/tr11/ - * - * Markus Kuhn -- 2007-05-26 (Unicode 5.0) - * - * Permission to use, copy, modify, and distribute this software - * for any purpose and without fee is hereby granted. The author - * disclaims all warranties with regard to this software. - * - * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c - */ - -var _ = require('underscore'); - - -// The following two functions define the column width of an ISO 10646 character as follows: -// -// - The null character (U+0000) has a column width of 0. -// - Other C0/C1 control characters and DEL will lead to a return value of -1. -// - Non-spacing and enclosing combining characters (general category code Mn or Me in the -// Unicode database) have a column width of 0. -// - SOFT HYPHEN (U+00AD) has a column width of 1. -// - Other format characters (general category code Cf in the Unicode database) and ZERO WIDTH -// SPACE (U+200B) have a column width of 0. -// - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF) have a column width of 0. -// - Spacing characters in the East Asian Wide (W) or East Asian Full-width (F) category as -// defined in Unicode Technical Report #11 have a column width of 2. -// - All remaining characters (including all printable ISO 8859-1 and WGL4 characters, Unicode -// control characters, etc.) have a column width of 1. -// -// This implementation assumes that characters are encoded in ISO 10646. -// -// optional option = { null: width, control: width, monkeypatch: boolean } -module.exports = wcwidth = function (option) { - // sorted list of non-overlapping intervals of non-spacing characters - // generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" - var combining = [ - [ 0x0300, 0x036F ], [ 0x0483, 0x0486 ], [ 0x0488, 0x0489 ], - [ 0x0591, 0x05BD ], [ 0x05BF, 0x05BF ], [ 0x05C1, 0x05C2 ], - [ 0x05C4, 0x05C5 ], [ 0x05C7, 0x05C7 ], [ 0x0600, 0x0603 ], - [ 0x0610, 0x0615 ], [ 0x064B, 0x065E ], [ 0x0670, 0x0670 ], - [ 0x06D6, 0x06E4 ], [ 0x06E7, 0x06E8 ], [ 0x06EA, 0x06ED ], - [ 0x070F, 0x070F ], [ 0x0711, 0x0711 ], [ 0x0730, 0x074A ], - [ 0x07A6, 0x07B0 ], [ 0x07EB, 0x07F3 ], [ 0x0901, 0x0902 ], - [ 0x093C, 0x093C ], [ 0x0941, 0x0948 ], [ 0x094D, 0x094D ], - [ 0x0951, 0x0954 ], [ 0x0962, 0x0963 ], [ 0x0981, 0x0981 ], - [ 0x09BC, 0x09BC ], [ 0x09C1, 0x09C4 ], [ 0x09CD, 0x09CD ], - [ 0x09E2, 0x09E3 ], [ 0x0A01, 0x0A02 ], [ 0x0A3C, 0x0A3C ], - [ 0x0A41, 0x0A42 ], [ 0x0A47, 0x0A48 ], [ 0x0A4B, 0x0A4D ], - [ 0x0A70, 0x0A71 ], [ 0x0A81, 0x0A82 ], [ 0x0ABC, 0x0ABC ], - [ 0x0AC1, 0x0AC5 ], [ 0x0AC7, 0x0AC8 ], [ 0x0ACD, 0x0ACD ], - [ 0x0AE2, 0x0AE3 ], [ 0x0B01, 0x0B01 ], [ 0x0B3C, 0x0B3C ], - [ 0x0B3F, 0x0B3F ], [ 0x0B41, 0x0B43 ], [ 0x0B4D, 0x0B4D ], - [ 0x0B56, 0x0B56 ], [ 0x0B82, 0x0B82 ], [ 0x0BC0, 0x0BC0 ], - [ 0x0BCD, 0x0BCD ], [ 0x0C3E, 0x0C40 ], [ 0x0C46, 0x0C48 ], - [ 0x0C4A, 0x0C4D ], [ 0x0C55, 0x0C56 ], [ 0x0CBC, 0x0CBC ], - [ 0x0CBF, 0x0CBF ], [ 0x0CC6, 0x0CC6 ], [ 0x0CCC, 0x0CCD ], - [ 0x0CE2, 0x0CE3 ], [ 0x0D41, 0x0D43 ], [ 0x0D4D, 0x0D4D ], - [ 0x0DCA, 0x0DCA ], [ 0x0DD2, 0x0DD4 ], [ 0x0DD6, 0x0DD6 ], - [ 0x0E31, 0x0E31 ], [ 0x0E34, 0x0E3A ], [ 0x0E47, 0x0E4E ], - [ 0x0EB1, 0x0EB1 ], [ 0x0EB4, 0x0EB9 ], [ 0x0EBB, 0x0EBC ], - [ 0x0EC8, 0x0ECD ], [ 0x0F18, 0x0F19 ], [ 0x0F35, 0x0F35 ], - [ 0x0F37, 0x0F37 ], [ 0x0F39, 0x0F39 ], [ 0x0F71, 0x0F7E ], - [ 0x0F80, 0x0F84 ], [ 0x0F86, 0x0F87 ], [ 0x0F90, 0x0F97 ], - [ 0x0F99, 0x0FBC ], [ 0x0FC6, 0x0FC6 ], [ 0x102D, 0x1030 ], - [ 0x1032, 0x1032 ], [ 0x1036, 0x1037 ], [ 0x1039, 0x1039 ], - [ 0x1058, 0x1059 ], [ 0x1160, 0x11FF ], [ 0x135F, 0x135F ], - [ 0x1712, 0x1714 ], [ 0x1732, 0x1734 ], [ 0x1752, 0x1753 ], - [ 0x1772, 0x1773 ], [ 0x17B4, 0x17B5 ], [ 0x17B7, 0x17BD ], - [ 0x17C6, 0x17C6 ], [ 0x17C9, 0x17D3 ], [ 0x17DD, 0x17DD ], - [ 0x180B, 0x180D ], [ 0x18A9, 0x18A9 ], [ 0x1920, 0x1922 ], - [ 0x1927, 0x1928 ], [ 0x1932, 0x1932 ], [ 0x1939, 0x193B ], - [ 0x1A17, 0x1A18 ], [ 0x1B00, 0x1B03 ], [ 0x1B34, 0x1B34 ], - [ 0x1B36, 0x1B3A ], [ 0x1B3C, 0x1B3C ], [ 0x1B42, 0x1B42 ], - [ 0x1B6B, 0x1B73 ], [ 0x1DC0, 0x1DCA ], [ 0x1DFE, 0x1DFF ], - [ 0x200B, 0x200F ], [ 0x202A, 0x202E ], [ 0x2060, 0x2063 ], - [ 0x206A, 0x206F ], [ 0x20D0, 0x20EF ], [ 0x302A, 0x302F ], - [ 0x3099, 0x309A ], [ 0xA806, 0xA806 ], [ 0xA80B, 0xA80B ], - [ 0xA825, 0xA826 ], [ 0xFB1E, 0xFB1E ], [ 0xFE00, 0xFE0F ], - [ 0xFE20, 0xFE23 ], [ 0xFEFF, 0xFEFF ], [ 0xFFF9, 0xFFFB ], - [ 0x10A01, 0x10A03 ], [ 0x10A05, 0x10A06 ], [ 0x10A0C, 0x10A0F ], - [ 0x10A38, 0x10A3A ], [ 0x10A3F, 0x10A3F ], [ 0x1D167, 0x1D169 ], - [ 0x1D173, 0x1D182 ], [ 0x1D185, 0x1D18B ], [ 0x1D1AA, 0x1D1AD ], - [ 0x1D242, 0x1D244 ], [ 0xE0001, 0xE0001 ], [ 0xE0020, 0xE007F ], - [ 0xE0100, 0xE01EF ] - ]; - - // auxiliary function for binary search in interval table - var bisearch = function(ucs) { - var min = 0, - max = combining.length-1; - var mid; - - if (ucs < combining[0][0] || ucs > combining[max][1]) - return false; - while (max >= min) { - mid = Math.floor((min + max) / 2); - if (ucs > combining[mid][1]) - min = mid + 1; - else if (ucs < combining[mid][0]) - max = mid - 1; - else - return true; - } - - return false; - } - - // ucs = 'character' or charCode - var wcwidth = function (ucs) { - // test for 8-bit control characters - if (ucs === 0) - return option.nul; - if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) - return option.control; - - // binary search in table of non-spacing characters - if (bisearch(ucs)) - return 0; - - // if we arrive here, ucs is not a combining or C0/C1 control character - return 1 + - (ucs >= 0x1100 && - (ucs <= 0x115f || // Hangul Jamo init. consonants - ucs == 0x2329 || ucs == 0x232a || - (ucs >= 0x2e80 && ucs <= 0xa4cf && - ucs != 0x303f) || // CJK ... Yi - (ucs >= 0xac00 && ucs <= 0xd7a3) || // Hangul Syllables - (ucs >= 0xf900 && ucs <= 0xfaff) || // CJK Compatibility Ideographs - (ucs >= 0xfe10 && ucs <= 0xfe19) || // Vertical forms - (ucs >= 0xfe30 && ucs <= 0xfe6f) || // CJK Compatibility Forms - (ucs >= 0xff00 && ucs <= 0xff60) || // Fullwidth Forms - (ucs >= 0xffe0 && ucs <= 0xffe6) || - (ucs >= 0x20000 && ucs <= 0x2fffd) || - (ucs >= 0x30000 && ucs <= 0x3fffd))); - }; - - var wcswidth = function (str) { - var i, l, n, s = 0; - - if (_.isString(str)) - for (i=0, l=str.length; i < l; i++) { - if ((n = wcwidth(str.charCodeAt(i))) < 0) - return -1; - s += n; - } - else - s = wcwidth(str); - - return s; - }; - - option = _.extend({ - nul: 0, - control: -1, - monkeypatch: true - }, option); - - if (option.monkeypatch) - String.prototype.__defineGetter__('wcwidth', function () { - return wcswidth(this); - }); - - return wcswidth; -}; - - -/* -(function () { - var ww = wcwidth(); - var test = [ - '다섯글자임', - 'four', - 'ten chars', - ' \n\t', - '\0' - ]; - - for (var i = 0; i < test.length; i++) - console.log(test[i], test[i].length, ww(test[i]), test[i].wcwidth); - console.log(ww('한글')); - console.log(ww('한'.charCodeAt(0))); -}()); -*/ - - -/* -(function () { - var ww = wcwidth({ - nul: 1, - control: 1, - monkeypatch: false - }); - var test = [ - '다섯글자임', - 'four', - 'ten chars', - ' \n\t', - '\0' - ]; - - for (var i = 0; i < test.length; i++) - console.log(test[i], test[i].length, ww(test[i]), test[i].wcwidth); - console.log(ww('한글')); - console.log(ww('한'.charCodeAt(0))); -}()); -*/ - -// end of wcwidth.js diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/.npmignore b/deps/npm/node_modules/columnify/node_modules/wcwidth/.npmignore new file mode 100644 index 0000000000..3c3629e647 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/LICENSE.md b/deps/npm/node_modules/columnify/node_modules/wcwidth/LICENSE similarity index 99% rename from deps/npm/node_modules/columnify/node_modules/wcwidth.js/LICENSE.md rename to deps/npm/node_modules/columnify/node_modules/wcwidth/LICENSE index 14deaf94b8..313ef1e888 100644 --- a/deps/npm/node_modules/columnify/node_modules/wcwidth.js/LICENSE.md +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/LICENSE @@ -27,3 +27,4 @@ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/Readme.md b/deps/npm/node_modules/columnify/node_modules/wcwidth/Readme.md new file mode 100644 index 0000000000..0649a31987 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/Readme.md @@ -0,0 +1,33 @@ +# wcwidth + +Determine columns needed for a fixed-size wide-character string + +---- + +wcwidth is a simple JavaScript port of [wcwidth](http://man7.org/linux/man-pages/man3/wcswidth.3.html) implemented in C by Markus Kuhn. + +JavaScript port [originally](https://github.com/mycoboco/wcwidth.js) written by Woong Jun (http://code.woong.org/) + +## Example + +```js +'한'.length // => 1 +wcwidth('한'); // => 2 + +'한글'.length // => 2 +wcwidth('한글'); // => 4 +``` + +`wcwidth()` and its string version, `wcswidth()` are defined by IEEE Std +1002.1-2001, a.k.a. POSIX.1-2001, and return the number of columns used +to represent the given wide character and string. + +Markus's implementation assumes the wide character given to those +functions to be encoded in ISO 10646, which is almost true for +JavaScript's characters. + +[Further explaination here](docs) + +## License + +MIT diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/combining.js b/deps/npm/node_modules/columnify/node_modules/wcwidth/combining.js new file mode 100644 index 0000000000..dac9789d35 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/combining.js @@ -0,0 +1,50 @@ +module.exports = [ + [ 0x0300, 0x036F ], [ 0x0483, 0x0486 ], [ 0x0488, 0x0489 ], + [ 0x0591, 0x05BD ], [ 0x05BF, 0x05BF ], [ 0x05C1, 0x05C2 ], + [ 0x05C4, 0x05C5 ], [ 0x05C7, 0x05C7 ], [ 0x0600, 0x0603 ], + [ 0x0610, 0x0615 ], [ 0x064B, 0x065E ], [ 0x0670, 0x0670 ], + [ 0x06D6, 0x06E4 ], [ 0x06E7, 0x06E8 ], [ 0x06EA, 0x06ED ], + [ 0x070F, 0x070F ], [ 0x0711, 0x0711 ], [ 0x0730, 0x074A ], + [ 0x07A6, 0x07B0 ], [ 0x07EB, 0x07F3 ], [ 0x0901, 0x0902 ], + [ 0x093C, 0x093C ], [ 0x0941, 0x0948 ], [ 0x094D, 0x094D ], + [ 0x0951, 0x0954 ], [ 0x0962, 0x0963 ], [ 0x0981, 0x0981 ], + [ 0x09BC, 0x09BC ], [ 0x09C1, 0x09C4 ], [ 0x09CD, 0x09CD ], + [ 0x09E2, 0x09E3 ], [ 0x0A01, 0x0A02 ], [ 0x0A3C, 0x0A3C ], + [ 0x0A41, 0x0A42 ], [ 0x0A47, 0x0A48 ], [ 0x0A4B, 0x0A4D ], + [ 0x0A70, 0x0A71 ], [ 0x0A81, 0x0A82 ], [ 0x0ABC, 0x0ABC ], + [ 0x0AC1, 0x0AC5 ], [ 0x0AC7, 0x0AC8 ], [ 0x0ACD, 0x0ACD ], + [ 0x0AE2, 0x0AE3 ], [ 0x0B01, 0x0B01 ], [ 0x0B3C, 0x0B3C ], + [ 0x0B3F, 0x0B3F ], [ 0x0B41, 0x0B43 ], [ 0x0B4D, 0x0B4D ], + [ 0x0B56, 0x0B56 ], [ 0x0B82, 0x0B82 ], [ 0x0BC0, 0x0BC0 ], + [ 0x0BCD, 0x0BCD ], [ 0x0C3E, 0x0C40 ], [ 0x0C46, 0x0C48 ], + [ 0x0C4A, 0x0C4D ], [ 0x0C55, 0x0C56 ], [ 0x0CBC, 0x0CBC ], + [ 0x0CBF, 0x0CBF ], [ 0x0CC6, 0x0CC6 ], [ 0x0CCC, 0x0CCD ], + [ 0x0CE2, 0x0CE3 ], [ 0x0D41, 0x0D43 ], [ 0x0D4D, 0x0D4D ], + [ 0x0DCA, 0x0DCA ], [ 0x0DD2, 0x0DD4 ], [ 0x0DD6, 0x0DD6 ], + [ 0x0E31, 0x0E31 ], [ 0x0E34, 0x0E3A ], [ 0x0E47, 0x0E4E ], + [ 0x0EB1, 0x0EB1 ], [ 0x0EB4, 0x0EB9 ], [ 0x0EBB, 0x0EBC ], + [ 0x0EC8, 0x0ECD ], [ 0x0F18, 0x0F19 ], [ 0x0F35, 0x0F35 ], + [ 0x0F37, 0x0F37 ], [ 0x0F39, 0x0F39 ], [ 0x0F71, 0x0F7E ], + [ 0x0F80, 0x0F84 ], [ 0x0F86, 0x0F87 ], [ 0x0F90, 0x0F97 ], + [ 0x0F99, 0x0FBC ], [ 0x0FC6, 0x0FC6 ], [ 0x102D, 0x1030 ], + [ 0x1032, 0x1032 ], [ 0x1036, 0x1037 ], [ 0x1039, 0x1039 ], + [ 0x1058, 0x1059 ], [ 0x1160, 0x11FF ], [ 0x135F, 0x135F ], + [ 0x1712, 0x1714 ], [ 0x1732, 0x1734 ], [ 0x1752, 0x1753 ], + [ 0x1772, 0x1773 ], [ 0x17B4, 0x17B5 ], [ 0x17B7, 0x17BD ], + [ 0x17C6, 0x17C6 ], [ 0x17C9, 0x17D3 ], [ 0x17DD, 0x17DD ], + [ 0x180B, 0x180D ], [ 0x18A9, 0x18A9 ], [ 0x1920, 0x1922 ], + [ 0x1927, 0x1928 ], [ 0x1932, 0x1932 ], [ 0x1939, 0x193B ], + [ 0x1A17, 0x1A18 ], [ 0x1B00, 0x1B03 ], [ 0x1B34, 0x1B34 ], + [ 0x1B36, 0x1B3A ], [ 0x1B3C, 0x1B3C ], [ 0x1B42, 0x1B42 ], + [ 0x1B6B, 0x1B73 ], [ 0x1DC0, 0x1DCA ], [ 0x1DFE, 0x1DFF ], + [ 0x200B, 0x200F ], [ 0x202A, 0x202E ], [ 0x2060, 0x2063 ], + [ 0x206A, 0x206F ], [ 0x20D0, 0x20EF ], [ 0x302A, 0x302F ], + [ 0x3099, 0x309A ], [ 0xA806, 0xA806 ], [ 0xA80B, 0xA80B ], + [ 0xA825, 0xA826 ], [ 0xFB1E, 0xFB1E ], [ 0xFE00, 0xFE0F ], + [ 0xFE20, 0xFE23 ], [ 0xFEFF, 0xFEFF ], [ 0xFFF9, 0xFFFB ], + [ 0x10A01, 0x10A03 ], [ 0x10A05, 0x10A06 ], [ 0x10A0C, 0x10A0F ], + [ 0x10A38, 0x10A3A ], [ 0x10A3F, 0x10A3F ], [ 0x1D167, 0x1D169 ], + [ 0x1D173, 0x1D182 ], [ 0x1D185, 0x1D18B ], [ 0x1D1AA, 0x1D1AD ], + [ 0x1D242, 0x1D244 ], [ 0xE0001, 0xE0001 ], [ 0xE0020, 0xE007F ], + [ 0xE0100, 0xE01EF ] +] diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/docs/index.md b/deps/npm/node_modules/columnify/node_modules/wcwidth/docs/index.md new file mode 100644 index 0000000000..5c5126d032 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/docs/index.md @@ -0,0 +1,65 @@ +### Javascript porting of Markus Kuhn's wcwidth() implementation + +The following explanation comes from the original C implementation: + +This is an implementation of wcwidth() and wcswidth() (defined in +IEEE Std 1002.1-2001) for Unicode. + +http://www.opengroup.org/onlinepubs/007904975/functions/wcwidth.html +http://www.opengroup.org/onlinepubs/007904975/functions/wcswidth.html + +In fixed-width output devices, Latin characters all occupy a single +"cell" position of equal width, whereas ideographic CJK characters +occupy two such cells. Interoperability between terminal-line +applications and (teletype-style) character terminals using the +UTF-8 encoding requires agreement on which character should advance +the cursor by how many cell positions. No established formal +standards exist at present on which Unicode character shall occupy +how many cell positions on character terminals. These routines are +a first attempt of defining such behavior based on simple rules +applied to data provided by the Unicode Consortium. + +For some graphical characters, the Unicode standard explicitly +defines a character-cell width via the definition of the East Asian +FullWidth (F), Wide (W), Half-width (H), and Narrow (Na) classes. +In all these cases, there is no ambiguity about which width a +terminal shall use. For characters in the East Asian Ambiguous (A) +class, the width choice depends purely on a preference of backward +compatibility with either historic CJK or Western practice. +Choosing single-width for these characters is easy to justify as +the appropriate long-term solution, as the CJK practice of +displaying these characters as double-width comes from historic +implementation simplicity (8-bit encoded characters were displayed +single-width and 16-bit ones double-width, even for Greek, +Cyrillic, etc.) and not any typographic considerations. + +Much less clear is the choice of width for the Not East Asian +(Neutral) class. Existing practice does not dictate a width for any +of these characters. It would nevertheless make sense +typographically to allocate two character cells to characters such +as for instance EM SPACE or VOLUME INTEGRAL, which cannot be +represented adequately with a single-width glyph. The following +routines at present merely assign a single-cell width to all +neutral characters, in the interest of simplicity. This is not +entirely satisfactory and should be reconsidered before +establishing a formal standard in this area. At the moment, the +decision which Not East Asian (Neutral) characters should be +represented by double-width glyphs cannot yet be answered by +applying a simple rule from the Unicode database content. Setting +up a proper standard for the behavior of UTF-8 character terminals +will require a careful analysis not only of each Unicode character, +but also of each presentation form, something the author of these +routines has avoided to do so far. + +http://www.unicode.org/unicode/reports/tr11/ + +Markus Kuhn -- 2007-05-26 (Unicode 5.0) + +Permission to use, copy, modify, and distribute this software +for any purpose and without fee is hereby granted. The author +disclaims all warranties with regard to this software. + +Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c + + + diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/index.js b/deps/npm/node_modules/columnify/node_modules/wcwidth/index.js new file mode 100644 index 0000000000..48cbb6020a --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/index.js @@ -0,0 +1,99 @@ +"use strict" + +var defaults = require('defaults') +var combining = require('./combining') + +var DEFAULTS = { + nul: 0, + control: 0 +} + +module.exports = function wcwidth(str) { + return wcswidth(str, DEFAULTS) +} + +module.exports.config = function(opts) { + opts = defaults(opts || {}, DEFAULTS) + return function wcwidth(str) { + return wcswidth(str, opts) + } +} + +/* + * The following functions define the column width of an ISO 10646 + * character as follows: + * - The null character (U+0000) has a column width of 0. + * - Other C0/C1 control characters and DEL will lead to a return value + * of -1. + * - Non-spacing and enclosing combining characters (general category + * code Mn or Me in the + * Unicode database) have a column width of 0. + * - SOFT HYPHEN (U+00AD) has a column width of 1. + * - Other format characters (general category code Cf in the Unicode + * database) and ZERO WIDTH + * SPACE (U+200B) have a column width of 0. + * - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF) + * have a column width of 0. + * - Spacing characters in the East Asian Wide (W) or East Asian + * Full-width (F) category as + * defined in Unicode Technical Report #11 have a column width of 2. + * - All remaining characters (including all printable ISO 8859-1 and + * WGL4 characters, Unicode control characters, etc.) have a column + * width of 1. + * This implementation assumes that characters are encoded in ISO 10646. +*/ + +function wcswidth(str, opts) { + if (typeof str !== 'string') return wcwidth(str, opts) + + var s = 0 + for (var i = 0; i < str.length; i++) { + var n = wcwidth(str.charCodeAt(i), opts) + if (n < 0) return -1 + s += n + } + + return s +} + +function wcwidth(ucs, opts) { + // test for 8-bit control characters + if (ucs === 0) return opts.nul + if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) return opts.control + + // binary search in table of non-spacing characters + if (bisearch(ucs)) return 0 + + // if we arrive here, ucs is not a combining or C0/C1 control character + return 1 + + (ucs >= 0x1100 && + (ucs <= 0x115f || // Hangul Jamo init. consonants + ucs == 0x2329 || ucs == 0x232a || + (ucs >= 0x2e80 && ucs <= 0xa4cf && + ucs != 0x303f) || // CJK ... Yi + (ucs >= 0xac00 && ucs <= 0xd7a3) || // Hangul Syllables + (ucs >= 0xf900 && ucs <= 0xfaff) || // CJK Compatibility Ideographs + (ucs >= 0xfe10 && ucs <= 0xfe19) || // Vertical forms + (ucs >= 0xfe30 && ucs <= 0xfe6f) || // CJK Compatibility Forms + (ucs >= 0xff00 && ucs <= 0xff60) || // Fullwidth Forms + (ucs >= 0xffe0 && ucs <= 0xffe6) || + (ucs >= 0x20000 && ucs <= 0x2fffd) || + (ucs >= 0x30000 && ucs <= 0x3fffd))); +} + +function bisearch(ucs) { + var min = 0 + var max = combining.length - 1 + var mid + + if (ucs < combining[0][0] || ucs > combining[max][1]) return false + + while (max >= min) { + mid = Math.floor((min + max) / 2) + if (ucs > combining[mid][1]) min = mid + 1 + else if (ucs < combining[mid][0]) max = mid - 1 + else return true + } + + return false +} diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/.npmignore b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/.npmignore new file mode 100644 index 0000000000..3c3629e647 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/README.md b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/README.md new file mode 100644 index 0000000000..a75e72e9fb --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/README.md @@ -0,0 +1,43 @@ +# defaults + +A simple one level options merge utility + +## install + +`npm install defaults` + +## use + +```javascript + +var defaults = require('defaults'); + +var handle = function(options, fn) { + options = defaults(options, { + timeout: 100 + }); + + setTimeout(function() { + fn(options); + }, options.timeout); +} + +handle({ timeout: 1000 }, function() { + // we're here 1000 ms later +}); + +handle({ timeout: 10000 }, function() { + // we're here 10s later +}); + +``` + +## summary + +this module exports a function that takes 2 arguments: `options` and `defaults`. When called, it overrides all of `undefined` properties in `options` with the clones of properties defined in `defaults` + +Sidecases: if called with a falsy `options` value, options will be initialized to a new object before being merged onto. + +## license + +MIT \ No newline at end of file diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/index.js b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/index.js new file mode 100644 index 0000000000..cb7d75c9c6 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/index.js @@ -0,0 +1,13 @@ +var clone = require('clone'); + +module.exports = function(options, defaults) { + options = options || {}; + + Object.keys(defaults).forEach(function(key) { + if (typeof options[key] === 'undefined') { + options[key] = clone(defaults[key]); + } + }); + + return options; +}; \ No newline at end of file diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/.npmignore b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/.npmignore new file mode 100644 index 0000000000..c2658d7d1b --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/.travis.yml b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/.travis.yml new file mode 100644 index 0000000000..58f23716ae --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - 0.10 diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/LICENSE b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/LICENSE new file mode 100644 index 0000000000..fc808cce89 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/LICENSE @@ -0,0 +1,18 @@ +Copyright © 2011-2014 Paul Vorbach + +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, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/README.md b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/README.md new file mode 100644 index 0000000000..527743b601 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/README.md @@ -0,0 +1,126 @@ +# clone + +[![build status](https://secure.travis-ci.org/pvorb/node-clone.png)](http://travis-ci.org/pvorb/node-clone) + +offers foolproof _deep cloning_ of variables in JavaScript. + + +## Installation + + npm install clone + +or + + ender build clone + + +## Example + +~~~ javascript +var clone = require('clone'); + +var a, b; + +a = { foo: { bar: 'baz' } }; // inital value of a + +b = clone(a); // clone a -> b +a.foo.bar = 'foo'; // change a + +console.log(a); // show a +console.log(b); // show b +~~~ + +This will print: + +~~~ javascript +{ foo: { bar: 'foo' } } +{ foo: { bar: 'baz' } } +~~~ + +**clone** masters cloning simple objects (even with custom prototype), arrays, +Date objects, and RegExp objects. Everything is cloned recursively, so that you +can clone dates in arrays in objects, for example. + + +## API + +`clone(val, circular, depth)` + + * `val` -- the value that you want to clone, any type allowed + * `circular` -- boolean + + Call `clone` with `circular` set to `false` if you are certain that `obj` + contains no circular references. This will give better performance if needed. + There is no error if `undefined` or `null` is passed as `obj`. + * `depth` -- depth to wich the object is to be cloned (optional, + defaults to infinity) + +`clone.clonePrototype(obj)` + + * `obj` -- the object that you want to clone + +Does a prototype clone as +[described by Oran Looney](http://oranlooney.com/functional-javascript/). + + +## Circular References + +~~~ javascript +var a, b; + +a = { hello: 'world' }; + +a.myself = a; +b = clone(a); + +console.log(b); +~~~ + +This will print: + +~~~ javascript +{ hello: "world", myself: [Circular] } +~~~ + +So, `b.myself` points to `b`, not `a`. Neat! + + +## Test + + npm test + + +## Caveat + +Some special objects like a socket or `process.stdout`/`stderr` are known to not +be cloneable. If you find other objects that cannot be cloned, please [open an +issue](https://github.com/pvorb/node-clone/issues/new). + + +## Bugs and Issues + +If you encounter any bugs or issues, feel free to [open an issue at +github](https://github.com/pvorb/node-clone/issues) or send me an email to +. I also always like to hear from you, if you’re using my code. + +## License + +Copyright © 2011-2014 [Paul Vorbach](http://paul.vorba.ch/) and +[contributors](https://github.com/pvorb/node-clone/graphs/contributors). + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/clone.js b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/clone.js new file mode 100644 index 0000000000..5d402073b3 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/clone.js @@ -0,0 +1,129 @@ +'use strict'; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + +// shim for Node's 'util' package +// DO NOT REMOVE THIS! It is required for compatibility with EnderJS (http://enderjs.com/). +var util = { + isArray: function (ar) { + return Array.isArray(ar) || (typeof ar === 'object' && objectToString(ar) === '[object Array]'); + }, + isDate: function (d) { + return typeof d === 'object' && objectToString(d) === '[object Date]'; + }, + isRegExp: function (re) { + return typeof re === 'object' && objectToString(re) === '[object RegExp]'; + }, + getRegExpFlags: function (re) { + var flags = ''; + re.global && (flags += 'g'); + re.ignoreCase && (flags += 'i'); + re.multiline && (flags += 'm'); + return flags; + } +}; + + +if (typeof module === 'object') + module.exports = clone; + +/** + * Clones (copies) an Object using deep copying. + * + * This function supports circular references by default, but if you are certain + * there are no circular references in your object, you can save some CPU time + * by calling clone(obj, false). + * + * Caution: if `circular` is false and `parent` contains circular references, + * your program may enter an infinite loop and crash. + * + * @param `parent` - the object to be cloned + * @param `circular` - set to true if the object to be cloned may contain + * circular references. (optional - true by default) + * @param `depth` - set to a number if the object is only to be cloned to + * a particular depth. (optional - defaults to Infinity) + * @param `prototype` - sets the prototype to be used when cloning an object. + * (optional - defaults to parent prototype). +*/ + +function clone(parent, circular, depth, prototype) { + // maintain two arrays for circular references, where corresponding parents + // and children have the same index + var allParents = []; + var allChildren = []; + + var useBuffer = typeof Buffer != 'undefined'; + + if (typeof circular == 'undefined') + circular = true; + + if (typeof depth == 'undefined') + depth = Infinity; + + // recurse this function so we don't reset allParents and allChildren + function _clone(parent, depth) { + // cloning null always returns null + if (parent === null) + return null; + + if (depth == 0) + return parent; + + var child; + if (typeof parent != 'object') { + return parent; + } + + if (util.isArray(parent)) { + child = []; + } else if (util.isRegExp(parent)) { + child = new RegExp(parent.source, util.getRegExpFlags(parent)); + if (parent.lastIndex) child.lastIndex = parent.lastIndex; + } else if (util.isDate(parent)) { + child = new Date(parent.getTime()); + } else if (useBuffer && Buffer.isBuffer(parent)) { + child = new Buffer(parent.length); + parent.copy(child); + return child; + } else { + if (typeof prototype == 'undefined') child = Object.create(Object.getPrototypeOf(parent)); + else child = Object.create(prototype); + } + + if (circular) { + var index = allParents.indexOf(parent); + + if (index != -1) { + return allChildren[index]; + } + allParents.push(parent); + allChildren.push(child); + } + + for (var i in parent) { + child[i] = _clone(parent[i], depth - 1); + } + + return child; + } + + return _clone(parent, depth); +} + +/** + * Simple flat clone using prototype, accepts only objects, usefull for property + * override on FLAT configuration object (no nested props). + * + * USE WITH CAUTION! This may not behave as you wish if you do not know how this + * works. + */ +clone.clonePrototype = function(parent) { + if (parent === null) + return null; + + var c = function () {}; + c.prototype = parent; + return new c(); +}; diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json new file mode 100644 index 0000000000..ee00ac7e54 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/package.json @@ -0,0 +1,122 @@ +{ + "name": "clone", + "description": "deep cloning of objects and arrays", + "tags": [ + "clone", + "object", + "array", + "function", + "date" + ], + "version": "0.1.18", + "repository": { + "type": "git", + "url": "git://github.com/pvorb/node-clone.git" + }, + "bugs": { + "url": "https://github.com/pvorb/node-clone/issues" + }, + "main": "clone.js", + "author": { + "name": "Paul Vorbach", + "email": "paul@vorba.ch", + "url": "http://paul.vorba.ch/" + }, + "contributors": [ + { + "name": "Blake Miner", + "email": "miner.blake@gmail.com", + "url": "http://www.blakeminer.com/" + }, + { + "name": "Tian You", + "email": "axqd001@gmail.com", + "url": "http://blog.axqd.net/" + }, + { + "name": "George Stagas", + "email": "gstagas@gmail.com", + "url": "http://stagas.com/" + }, + { + "name": "Tobiasz Cudnik", + "email": "tobiasz.cudnik@gmail.com", + "url": "https://github.com/TobiaszCudnik" + }, + { + "name": "Pavel Lang", + "email": "langpavel@phpskelet.org", + "url": "https://github.com/langpavel" + }, + { + "name": "Dan MacTough", + "url": "http://yabfog.com/" + }, + { + "name": "w1nk", + "url": "https://github.com/w1nk" + }, + { + "name": "Hugh Kennedy", + "url": "http://twitter.com/hughskennedy" + }, + { + "name": "Dustin Diaz", + "url": "http://dustindiaz.com" + }, + { + "name": "Ilya Shaisultanov", + "url": "https://github.com/diversario" + }, + { + "name": "Nathan MacInnes", + "email": "nathan@macinn.es", + "url": "http://macinn.es/" + }, + { + "name": "Benjamin E. Coe", + "email": "ben@npmjs.com", + "url": "https://twitter.com/benjamincoe" + }, + { + "name": "Nathan Zadoks", + "url": "https://github.com/nathan7" + } + ], + "license": "MIT", + "engines": { + "node": "*" + }, + "dependencies": {}, + "devDependencies": { + "underscore": "*", + "nodeunit": "*" + }, + "optionalDependencies": {}, + "scripts": { + "test": "nodeunit test.js" + }, + "gitHead": "17eea36140d61d97a9954c53417d0e04a00525d9", + "homepage": "https://github.com/pvorb/node-clone", + "_id": "clone@0.1.18", + "_shasum": "64a0d5d57eaa85a1a8af380cd1db8c7b3a895f66", + "_from": "clone@~0.1.5", + "_npmVersion": "1.4.14", + "_npmUser": { + "name": "pvorb", + "email": "paul@vorba.ch" + }, + "maintainers": [ + { + "name": "pvorb", + "email": "paul@vorb.de" + } + ], + "dist": { + "shasum": "64a0d5d57eaa85a1a8af380cd1db8c7b3a895f66", + "tarball": "http://registry.npmjs.org/clone/-/clone-0.1.18.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/clone/-/clone-0.1.18.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/test.js b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/test.js new file mode 100644 index 0000000000..ee49ad893a --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/node_modules/clone/test.js @@ -0,0 +1,271 @@ +if(module.parent === null) { + console.log('Run this test file with nodeunit:'); + console.log('$ nodeunit test.js'); +} + + +var clone = require('./'); +var util = require('util'); +var _ = require('underscore'); + + + +exports["clone string"] = function(test) { + test.expect(2); // how many tests? + + var a = "foo"; + test.strictEqual(clone(a), a); + a = ""; + test.strictEqual(clone(a), a); + + test.done(); +}; + + + +exports["clone number"] = function(test) { + test.expect(5); // how many tests? + + var a = 0; + test.strictEqual(clone(a), a); + a = 1; + test.strictEqual(clone(a), a); + a = -1000; + test.strictEqual(clone(a), a); + a = 3.1415927; + test.strictEqual(clone(a), a); + a = -3.1415927; + test.strictEqual(clone(a), a); + + test.done(); +}; + + + +exports["clone date"] = function(test) { + test.expect(3); // how many tests? + + var a = new Date; + var c = clone(a); + test.ok(a instanceof Date); + test.ok(c instanceof Date); + test.equal(c.getTime(), a.getTime()); + + test.done(); +}; + + + +exports["clone object"] = function(test) { + test.expect(2); // how many tests? + + var a = { foo: { bar: "baz" } }; + var b = clone(a); + + test.ok(_(a).isEqual(b), "underscore equal"); + test.deepEqual(b, a); + + test.done(); +}; + + + +exports["clone array"] = function(test) { + test.expect(2); // how many tests? + + var a = [ + { foo: "bar" }, + "baz" + ]; + var b = clone(a); + + test.ok(_(a).isEqual(b), "underscore equal"); + test.deepEqual(b, a); + + test.done(); +}; + +exports["clone buffer"] = function(test) { + test.expect(1); + + var a = new Buffer("this is a test buffer"); + var b = clone(a); + + // no underscore equal since it has no concept of Buffers + test.deepEqual(b, a); + test.done(); +}; + + + +exports["clone regexp"] = function(test) { + test.expect(5); + + var a = /abc123/gi; + var b = clone(a); + + test.deepEqual(b, a); + + var c = /a/g; + test.ok(c.lastIndex === 0); + + c.exec('123a456a'); + test.ok(c.lastIndex === 4); + + var d = clone(c); + test.ok(d.global); + test.ok(d.lastIndex === 4); + + test.done(); +}; + + +exports["clone object containing array"] = function(test) { + test.expect(2); // how many tests? + + var a = { + arr1: [ { a: '1234', b: '2345' } ], + arr2: [ { c: '345', d: '456' } ] + }; + var b = clone(a); + + test.ok(_(a).isEqual(b), "underscore equal"); + test.deepEqual(b, a); + + test.done(); +}; + + + +exports["clone object with circular reference"] = function(test) { + test.expect(8); // how many tests? + + var _ = test.ok; + var c = [1, "foo", {'hello': 'bar'}, function() {}, false, [2]]; + var b = [c, 2, 3, 4]; + var a = {'b': b, 'c': c}; + a.loop = a; + a.loop2 = a; + c.loop = c; + c.aloop = a; + var aCopy = clone(a); + _(a != aCopy); + _(a.c != aCopy.c); + _(aCopy.c == aCopy.b[0]); + _(aCopy.c.loop.loop.aloop == aCopy); + _(aCopy.c[0] == a.c[0]); + + //console.log(util.inspect(aCopy, true, null) ); + //console.log("------------------------------------------------------------"); + //console.log(util.inspect(a, true, null) ); + _(eq(a, aCopy)); + aCopy.c[0] = 2; + _(!eq(a, aCopy)); + aCopy.c = "2"; + _(!eq(a, aCopy)); + //console.log("------------------------------------------------------------"); + //console.log(util.inspect(aCopy, true, null) ); + + function eq(x, y) { + return util.inspect(x, true, null) === util.inspect(y, true, null); + } + + test.done(); +}; + + + +exports['clonePrototype'] = function(test) { + test.expect(3); // how many tests? + + var a = { + a: "aaa", + x: 123, + y: 45.65 + }; + var b = clone.clonePrototype(a); + + test.strictEqual(b.a, a.a); + test.strictEqual(b.x, a.x); + test.strictEqual(b.y, a.y); + + test.done(); +} + +exports['cloneWithinNewVMContext'] = function(test) { + test.expect(3); + var vm = require('vm'); + var ctx = vm.createContext({ clone: clone }); + var script = "clone( {array: [1, 2, 3], date: new Date(), regex: /^foo$/ig} );"; + var results = vm.runInContext(script, ctx); + test.ok(results.array instanceof Array); + test.ok(results.date instanceof Date); + test.ok(results.regex instanceof RegExp); + test.done(); +} + +exports['cloneObjectWithNoConstructor'] = function(test) { + test.expect(3); + var n = null; + var a = { foo: 'bar' }; + a.__proto__ = n; + test.ok(typeof a === 'object'); + test.ok(typeof a !== null); + var b = clone(a); + test.ok(a.foo, b.foo); + test.done(); +} + +exports['clone object with depth argument'] = function (test) { + test.expect(6); + var a = { + foo: { + bar : { + baz : 'qux' + } + } + }; + var b = clone(a, false, 1); + test.deepEqual(b, a); + test.notEqual(b, a); + test.strictEqual(b.foo, a.foo); + + b = clone(a, true, 2); + test.deepEqual(b, a); + test.notEqual(b.foo, a.foo); + test.strictEqual(b.foo.bar, a.foo.bar); + test.done(); +} + +exports['maintain prototype chain in clones'] = function (test) { + test.expect(1); + function Constructor() {} + var a = new Constructor(); + var b = clone(a); + test.strictEqual(Object.getPrototypeOf(a), Object.getPrototypeOf(b)); + test.done(); +} + +exports['parent prototype is overriden with prototype provided'] = function (test) { + test.expect(1); + function Constructor() {} + var a = new Constructor(); + var b = clone(a, true, Infinity, null); + test.strictEqual(b.__defineSetter__, undefined); + test.done(); +} + +exports['clone object with null children'] = function(test) { + test.expect(1); + var a = { + foo: { + bar: null, + baz: { + qux: false + } + } + }; + var b = clone(a); + test.deepEqual(b, a); + test.done(); +} diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json new file mode 100644 index 0000000000..ba00482142 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/package.json @@ -0,0 +1,54 @@ +{ + "name": "defaults", + "version": "1.0.0", + "description": "merge single level defaults over a config object", + "main": "index.js", + "scripts": { + "test": "node test.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/tmpvar/defaults.git" + }, + "keywords": [ + "config", + "defaults" + ], + "author": { + "name": "Elijah Insua", + "email": "tmpvar@gmail.com" + }, + "license": "MIT", + "readmeFilename": "README.md", + "dependencies": { + "clone": "~0.1.5" + }, + "devDependencies": { + "tap": "~0.4.0" + }, + "readme": "# defaults\n\nA simple one level options merge utility\n\n## install\n\n`npm install defaults`\n\n## use\n\n```javascript\n\nvar defaults = require('defaults');\n\nvar handle = function(options, fn) {\n options = defaults(options, {\n timeout: 100\n });\n\n setTimeout(function() {\n fn(options);\n }, options.timeout);\n}\n\nhandle({ timeout: 1000 }, function() {\n // we're here 1000 ms later\n});\n\nhandle({ timeout: 10000 }, function() {\n // we're here 10s later\n});\n\n```\n\n## summary\n\nthis module exports a function that takes 2 arguments: `options` and `defaults`. When called, it overrides all of `undefined` properties in `options` with the clones of properties defined in `defaults`\n\nSidecases: if called with a falsy `options` value, options will be initialized to a new object before being merged onto.\n\n## license\n\nMIT", + "_id": "defaults@1.0.0", + "dist": { + "shasum": "3ae25f44416c6c01f9809a25fcdd285912d2a6b1", + "tarball": "http://registry.npmjs.org/defaults/-/defaults-1.0.0.tgz" + }, + "_npmVersion": "1.1.65", + "_npmUser": { + "name": "tmpvar", + "email": "tmpvar@gmail.com" + }, + "maintainers": [ + { + "name": "tmpvar", + "email": "tmpvar@gmail.com" + } + ], + "directories": {}, + "_shasum": "3ae25f44416c6c01f9809a25fcdd285912d2a6b1", + "_from": "defaults@^1.0.0", + "_resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.0.tgz", + "bugs": { + "url": "https://github.com/tmpvar/defaults/issues" + }, + "homepage": "https://github.com/tmpvar/defaults" +} diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/test.js b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/test.js new file mode 100644 index 0000000000..60e0ffba8b --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/node_modules/defaults/test.js @@ -0,0 +1,34 @@ +var defaults = require('./'), + test = require('tap').test; + +test("ensure options is an object", function(t) { + var options = defaults(false, { a : true }); + t.ok(options.a); + t.end() +}); + +test("ensure defaults override keys", function(t) { + var result = defaults({}, { a: false, b: true }); + t.ok(result.b, 'b merges over undefined'); + t.equal(result.a, false, 'a merges over undefined'); + t.end(); +}); + +test("ensure defined keys are not overwritten", function(t) { + var result = defaults({ b: false }, { a: false, b: true }); + t.equal(result.b, false, 'b not merged'); + t.equal(result.a, false, 'a merges over undefined'); + t.end(); +}); + +test("ensure defaults clone nested objects", function(t) { + var d = { a: [1,2,3], b: { hello : 'world' } }; + var result = defaults({}, d); + t.equal(result.a.length, 3, 'objects should be clones'); + t.ok(result.a !== d.a, 'objects should be clones'); + + t.equal(Object.keys(result.b).length, 1, 'objects should be clones'); + t.ok(result.b !== d.b, 'objects should be clones'); + t.end(); +}); + diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json b/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json new file mode 100644 index 0000000000..0045c3cdba --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/package.json @@ -0,0 +1,61 @@ +{ + "name": "wcwidth", + "version": "1.0.0", + "description": "Port of C's wcwidth() and wcswidth()", + "author": { + "name": "Tim Oxley" + }, + "contributors": [ + { + "name": "Woong Jun", + "email": "woong.jun@gmail.com", + "url": "http://code.woong.org/" + } + ], + "main": "index.js", + "dependencies": { + "defaults": "^1.0.0" + }, + "devDependencies": { + "tape": "^2.13.4" + }, + "license": "MIT", + "keywords": [ + "wide character", + "wc", + "wide character string", + "wcs", + "terminal", + "width", + "wcwidth", + "wcswidth" + ], + "directories": { + "doc": "docs", + "test": "test" + }, + "scripts": { + "test": "tape test/*.js" + }, + "gitHead": "5bc3aafd45c89f233c27b9479c18a23ca91ba660", + "_id": "wcwidth@1.0.0", + "_shasum": "02d059ff7a8fc741e0f6b5da1e69b2b40daeca6f", + "_from": "wcwidth@^1.0.0", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "timoxley", + "email": "secoif@gmail.com" + }, + "maintainers": [ + { + "name": "timoxley", + "email": "secoif@gmail.com" + } + ], + "dist": { + "shasum": "02d059ff7a8fc741e0f6b5da1e69b2b40daeca6f", + "tarball": "http://registry.npmjs.org/wcwidth/-/wcwidth-1.0.0.tgz" + }, + "_resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/columnify/node_modules/wcwidth/test/index.js b/deps/npm/node_modules/columnify/node_modules/wcwidth/test/index.js new file mode 100644 index 0000000000..5180599a2f --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/wcwidth/test/index.js @@ -0,0 +1,64 @@ +"use strict" + +var wcwidth = require('../') +var test = require('tape') + +test('handles regular strings', function(t) { + t.strictEqual(wcwidth('abc'), 3) + t.end() +}) + +test('handles multibyte strings', function(t) { + t.strictEqual(wcwidth('字的模块'), 8) + t.end() +}) + +test('handles multibyte characters mixed with regular characters', function(t) { + t.strictEqual(wcwidth('abc 字的模块'), 12) + t.end() +}) + +test('ignores control characters e.g. \\n', function(t) { + t.strictEqual(wcwidth('abc\n字的模块\ndef'), 14) + t.end() +}) + +test('ignores bad input', function(t) { + t.strictEqual(wcwidth(''), 0) + t.strictEqual(wcwidth(3), 0) + t.strictEqual(wcwidth({}), 0) + t.strictEqual(wcwidth([]), 0) + t.strictEqual(wcwidth(), 0) + t.end() +}) + +test('ignores nul (charcode 0)', function(t) { + t.strictEqual(wcwidth(String.fromCharCode(0)), 0) + t.end() +}) + +test('ignores nul mixed with chars', function(t) { + t.strictEqual(wcwidth('a' + String.fromCharCode(0) + '\n字的'), 5) + t.end() +}) + +test('can have custom value for nul', function(t) { + t.strictEqual(wcwidth.config({ + nul: 10 + })(String.fromCharCode(0) + 'a字的'), 15) + t.end() +}) + +test('can have custom control char value', function(t) { + t.strictEqual(wcwidth.config({ + control: 1 + })('abc\n字的模块\ndef'), 16) + t.end() +}) + +test('negative custom control chars == -1', function(t) { + t.strictEqual(wcwidth.config({ + control: -1 + })('abc\n字的模块\ndef'), -1) + t.end() +}) diff --git a/deps/npm/node_modules/columnify/package.json b/deps/npm/node_modules/columnify/package.json index ba3124f147..01ac64bb21 100644 --- a/deps/npm/node_modules/columnify/package.json +++ b/deps/npm/node_modules/columnify/package.json @@ -1,9 +1,10 @@ { "name": "columnify", - "version": "1.1.0", + "version": "1.2.1", "description": "Render data in text columns, supports in-column text-wrap.", "main": "index.js", "scripts": { + "pretest": "npm prune", "test": "faucet" }, "author": { @@ -33,16 +34,17 @@ }, "homepage": "https://github.com/timoxley/columnify", "dependencies": { - "strip-ansi": "^0.2.1", - "wcwidth.js": "~0.0.4" + "strip-ansi": "^1.0.0", + "wcwidth": "^1.0.0" }, "directories": { "test": "test" }, - "_id": "columnify@1.1.0", - "_shasum": "0b908e6d4f1c80194358a1933aaf9dc49271c679", - "_from": "columnify@latest", - "_npmVersion": "1.4.10", + "gitHead": "14e77bef3f57acaa3f390145915a9f2d2a4f882c", + "_id": "columnify@1.2.1", + "_shasum": "921ec51c178f4126d3c07e9acecd67a55c7953e4", + "_from": "columnify@^1.2.1", + "_npmVersion": "1.4.23", "_npmUser": { "name": "timoxley", "email": "secoif@gmail.com" @@ -54,9 +56,9 @@ } ], "dist": { - "shasum": "0b908e6d4f1c80194358a1933aaf9dc49271c679", - "tarball": "http://registry.npmjs.org/columnify/-/columnify-1.1.0.tgz" + "shasum": "921ec51c178f4126d3c07e9acecd67a55c7953e4", + "tarball": "http://registry.npmjs.org/columnify/-/columnify-1.2.1.tgz" }, - "_resolved": "https://registry.npmjs.org/columnify/-/columnify-1.1.0.tgz", + "_resolved": "https://registry.npmjs.org/columnify/-/columnify-1.2.1.tgz", "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/columnify/utils.js b/deps/npm/node_modules/columnify/utils.js index 12c4f003c5..30682af3b1 100644 --- a/deps/npm/node_modules/columnify/utils.js +++ b/deps/npm/node_modules/columnify/utils.js @@ -2,6 +2,17 @@ var wcwidth = require('./width') +/** + * repeat string `str` up to total length of `len` + * + * @param String str string to repeat + * @param Number len total length of output string + */ + +function repeatString(str, len) { + return Array.apply(null, {length: len + 1}).join(str).slice(0, len) +} + /** * Pad `str` up to total length `max` with `chr`. * If `str` is longer than `max`, padRight will return `str` unaltered. @@ -15,10 +26,29 @@ var wcwidth = require('./width') function padRight(str, max, chr) { str = str != null ? str : '' str = String(str) - var length = 1 + max - wcwidth(str) + var length = max - wcwidth(str) if (length <= 0) return str - return str + Array.apply(null, {length: length}) - .join(chr || ' ') + return str + repeatString(chr || ' ', length) +} + +/** + * Pad `str` up to total length `max` with `chr`. + * If `str` is longer than `max`, padCenter will return `str` unaltered. + * + * @param String str string to pad + * @param Number max total length of output string + * @param String chr optional. Character to pad with. default: ' ' + * @return String padded str + */ + +function padCenter(str, max, chr) { + str = str != null ? str : '' + str = String(str) + var length = max - wcwidth(str) + if (length <= 0) return str + var lengthLeft = Math.floor(length/2) + var lengthRight = length - lengthLeft + return repeatString(chr || ' ', lengthLeft) + str + repeatString(chr || ' ', lengthRight) } /** @@ -34,9 +64,9 @@ function padRight(str, max, chr) { function padLeft(str, max, chr) { str = str != null ? str : '' str = String(str) - var length = 1 + max - wcwidth(str) + var length = max - wcwidth(str) if (length <= 0) return str - return Array.apply(null, {length: length}).join(chr || ' ') + str + return repeatString(chr || ' ', length) + str } /** @@ -143,8 +173,8 @@ function truncateString(str, max) { */ module.exports.padRight = padRight +module.exports.padCenter = padCenter module.exports.padLeft = padLeft module.exports.splitIntoLines = splitIntoLines module.exports.splitLongWords = splitLongWords module.exports.truncateString = truncateString - diff --git a/deps/npm/node_modules/columnify/width.js b/deps/npm/node_modules/columnify/width.js index 8498f40838..a9f5333b40 100644 --- a/deps/npm/node_modules/columnify/width.js +++ b/deps/npm/node_modules/columnify/width.js @@ -1,5 +1,5 @@ var stripAnsi = require('strip-ansi') -var wcwidth = require('wcwidth.js')({ monkeypatch: false, control: 0 }) +var wcwidth = require('wcwidth') module.exports = function(str) { return wcwidth(stripAnsi(str)) diff --git a/deps/npm/node_modules/fstream/lib/writer.js b/deps/npm/node_modules/fstream/lib/writer.js index 5599fb2222..8b1bbf94f0 100644 --- a/deps/npm/node_modules/fstream/lib/writer.js +++ b/deps/npm/node_modules/fstream/lib/writer.js @@ -246,6 +246,9 @@ function endUtimes (me, want, current, path, cb) { Writer.prototype._finish = function () { var me = this + if (me._finishing) return + me._finishing = true + // console.error(" W Finish", me._path, me.size) // set up all the things. diff --git a/deps/npm/node_modules/fstream/package.json b/deps/npm/node_modules/fstream/package.json index 59de9ebe58..de7f7bc14f 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.0", + "version": "1.0.2", "repository": { "type": "git", "url": "git://github.com/isaacs/fstream.git" @@ -16,9 +16,9 @@ "node": ">=0.6" }, "dependencies": { - "graceful-fs": "^3.0.2", + "graceful-fs": "3", "inherits": "~2.0.0", - "mkdirp": "^0.5.0", + "mkdirp": ">=0.5 0", "rimraf": "2" }, "devDependencies": { @@ -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": "1468b5b583646cd4f5c535e6b53c8896a4fed40f", + "gitHead": "b3b74e92ef4a91ae206fab90b7998c7cd2e4290d", "bugs": { "url": "https://github.com/isaacs/fstream/issues" }, "homepage": "https://github.com/isaacs/fstream", - "_id": "fstream@1.0.0", - "_shasum": "7feb8b42ebc588485bf3676a00bd048d4a2e1c28", + "_id": "fstream@1.0.2", + "_shasum": "56930ff1b4d4d7b1a689c8656b3a11e744ab92c6", "_from": "fstream@latest" } diff --git a/deps/npm/node_modules/github-url-from-git/Readme.md b/deps/npm/node_modules/github-url-from-git/Readme.md index 0525e44ec4..9dccaa8db6 100644 --- a/deps/npm/node_modules/github-url-from-git/Readme.md +++ b/deps/npm/node_modules/github-url-from-git/Readme.md @@ -38,6 +38,16 @@ describe('parse(url)', function(){ parse(url).should.eql('https://github.com/bcoe/thumbd'); }) + it('should parse git+https://github.com/bcoe/thumbd.git', function() { + var url = 'git+https://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git+ssh://github.com/bcoe/thumbd.git', function() { + var url = 'git+ssh://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function() { var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git'; parse(url).should.eql('https://github.com/EastCloud/node-websockets'); diff --git a/deps/npm/node_modules/github-url-from-git/index.js b/deps/npm/node_modules/github-url-from-git/index.js index f1ec85ed30..44872e8c10 100644 --- a/deps/npm/node_modules/github-url-from-git/index.js +++ b/deps/npm/node_modules/github-url-from-git/index.js @@ -21,7 +21,7 @@ function re(opts) { var baseUrls = ['gist.github.com', 'github.com'].concat(opts.extraBaseUrls || []); // build regex from whitelist. return new RegExp( - /^(?:https?:\/\/|git:\/\/)?(?:[^@]+@)?/.source + + /^(?:https?:\/\/|git:\/\/|git\+ssh:\/\/|git\+https:\/\/)?(?:[^@]+@)?/.source + '(' + baseUrls.join('|') + ')' + /[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source ); diff --git a/deps/npm/node_modules/github-url-from-git/package.json b/deps/npm/node_modules/github-url-from-git/package.json index fb396bf95e..978435c7da 100644 --- a/deps/npm/node_modules/github-url-from-git/package.json +++ b/deps/npm/node_modules/github-url-from-git/package.json @@ -1,6 +1,6 @@ { "name": "github-url-from-git", - "version": "1.3.0", + "version": "1.4.0", "description": "Parse a github git url and return the github repo url", "main": "index.js", "scripts": { @@ -25,15 +25,15 @@ "mocha": "~1.9.0", "should": "~1.2.2" }, - "gitHead": "d92a033d7e769264f17ae8ef4409e6a31e0cd016", + "gitHead": "154df00b0b590c29be5d2a5822e7b2e160b75345", "bugs": { "url": "https://github.com/visionmedia/node-github-url-from-git/issues" }, "homepage": "https://github.com/visionmedia/node-github-url-from-git", - "_id": "github-url-from-git@1.3.0", - "_shasum": "6e79d9779632ca78aa645c67bb419f70e51d69f7", - "_from": "github-url-from-git@latest", - "_npmVersion": "1.5.0-alpha-4", + "_id": "github-url-from-git@1.4.0", + "_shasum": "285e6b520819001bde128674704379e4ff03e0de", + "_from": "github-url-from-git@^1.4.0", + "_npmVersion": "2.0.0-alpha.7", "_npmUser": { "name": "bcoe", "email": "bencoe@gmail.com" @@ -49,10 +49,10 @@ } ], "dist": { - "shasum": "6e79d9779632ca78aa645c67bb419f70e51d69f7", - "tarball": "http://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.3.0.tgz" + "shasum": "285e6b520819001bde128674704379e4ff03e0de", + "tarball": "http://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.4.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.3.0.tgz", + "_resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.4.0.tgz", "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/github-url-from-git/test.js b/deps/npm/node_modules/github-url-from-git/test.js index f0675283f5..93aa38bb1f 100644 --- a/deps/npm/node_modules/github-url-from-git/test.js +++ b/deps/npm/node_modules/github-url-from-git/test.js @@ -37,6 +37,16 @@ describe('parse(url)', function(){ parse(url).should.eql('https://github.com/bcoe/thumbd'); }) + it('should parse git+https://github.com/bcoe/thumbd.git', function() { + var url = 'git+https://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git+ssh://github.com/bcoe/thumbd.git', function() { + var url = 'git+ssh://github.com/bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function() { var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git'; parse(url).should.eql('https://github.com/EastCloud/node-websockets'); @@ -74,7 +84,7 @@ describe('parse(url)', function(){ describe('re', function() { it('should expose GitHub url parsing regex', function() { parse.re.source.should.equal( - /^(?:https?:\/\/|git:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source + /^(?:https?:\/\/|git:\/\/|git\+ssh:\/\/|git\+https:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source ) }); }) diff --git a/deps/npm/node_modules/github-url-from-username-repo/README.md b/deps/npm/node_modules/github-url-from-username-repo/README.md index 27c4054b26..9adbee0ea3 100644 --- a/deps/npm/node_modules/github-url-from-username-repo/README.md +++ b/deps/npm/node_modules/github-url-from-username-repo/README.md @@ -4,11 +4,18 @@ # github-url-from-username-repo +## API + +### getUrl(url, [forBrowser]) + +Get's the url normalized for npm. +If `forBrowser` is true, return a GitHub url that is usable in a webbrowser. + ## Usage ```javascript var getUrl = require("github-url-from-username-repo") -getUrl("visionmedia/express") // git://github.com/visionmedia/express +getUrl("visionmedia/express") // https://github.com/visionmedia/express -``` \ No newline at end of file +``` diff --git a/deps/npm/node_modules/github-url-from-username-repo/index.js b/deps/npm/node_modules/github-url-from-username-repo/index.js index 60ed7aa4e4..794daabf3b 100644 --- a/deps/npm/node_modules/github-url-from-username-repo/index.js +++ b/deps/npm/node_modules/github-url-from-username-repo/index.js @@ -1,9 +1,12 @@ module.exports = getUrl -function getUrl (r) { +function getUrl (r, forBrowser) { if (!r) return null - if (/^[\w-]+\/[\w\.-]+$/.test(r)) + if (/^[\w-]+\/[\w\.-]+(#[a-z0-9]*)?$/.test(r)) { + if (forBrowser) + r = r.replace("#", "/tree/") return "https://github.com/" + r - else - return null + } + + return null } diff --git a/deps/npm/node_modules/github-url-from-username-repo/package.json b/deps/npm/node_modules/github-url-from-username-repo/package.json index 56dd698df2..8b6be10115 100644 --- a/deps/npm/node_modules/github-url-from-username-repo/package.json +++ b/deps/npm/node_modules/github-url-from-username-repo/package.json @@ -1,6 +1,6 @@ { "name": "github-url-from-username-repo", - "version": "0.2.0", + "version": "1.0.0", "description": "Create urls from username/repo", "main": "index.js", "scripts": { @@ -26,11 +26,12 @@ "github", "repo" ], + "gitHead": "d5b3c01193504d67b3ecc030e93d5c58c9b0df63", "homepage": "https://github.com/robertkowalski/github-url-from-username-repo", - "_id": "github-url-from-username-repo@0.2.0", - "_shasum": "7590b4fa605b7a6cbb7e06ffcd9d253210f9dbe1", - "_from": "github-url-from-username-repo@latest", - "_npmVersion": "1.4.9", + "_id": "github-url-from-username-repo@1.0.0", + "_shasum": "848d4f19bc838dc428484ce0dc33da593e8400ed", + "_from": "github-url-from-username-repo@^1.0.0", + "_npmVersion": "1.4.21", "_npmUser": { "name": "robertkowalski", "email": "rok@kowalski.gd" @@ -39,12 +40,20 @@ { "name": "robertkowalski", "email": "rok@kowalski.gd" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" } ], "dist": { - "shasum": "7590b4fa605b7a6cbb7e06ffcd9d253210f9dbe1", - "tarball": "http://registry.npmjs.org/github-url-from-username-repo/-/github-url-from-username-repo-0.2.0.tgz" + "shasum": "848d4f19bc838dc428484ce0dc33da593e8400ed", + "tarball": "http://registry.npmjs.org/github-url-from-username-repo/-/github-url-from-username-repo-1.0.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/github-url-from-username-repo/-/github-url-from-username-repo-0.2.0.tgz" + "_resolved": "https://registry.npmjs.org/github-url-from-username-repo/-/github-url-from-username-repo-1.0.0.tgz" } diff --git a/deps/npm/node_modules/github-url-from-username-repo/test/index.js b/deps/npm/node_modules/github-url-from-username-repo/test/index.js index 14c7dd16c2..935bb439d3 100644 --- a/deps/npm/node_modules/github-url-from-username-repo/test/index.js +++ b/deps/npm/node_modules/github-url-from-username-repo/test/index.js @@ -18,8 +18,8 @@ describe("github url from username/repo", function () { }) it("works with .", function () { - var url = getUrl("component/downloader.js") - assert.equal("https://github.com/component/downloader.js", url) + var url = getUrl("component/.download.er.js.") + assert.equal("https://github.com/component/.download.er.js.", url) }) it("works with . in the beginning", function () { @@ -31,4 +31,28 @@ describe("github url from username/repo", function () { var url = getUrl("component/-dow-nloader.j-s") assert.equal("https://github.com/component/-dow-nloader.j-s", url) }) + + it("can handle branches with #", function () { + var url = getUrl( + "component/entejs#1c3e1fe71640b4b477f04d947bd53c473799b277") + + assert.equal("https://github.com/component/entejs#1c3e1fe71640b" + + "4b477f04d947bd53c473799b277", url) + }) + + describe("browser mode", function () { + it("is able to return urls for branches", function () { + var url = getUrl( + "component/entejs#1c3e1fe71640b4b477f04d947bd53c473799b277", true) + + assert.equal("https://github.com/component/entejs/tree/1c3e1fe71640b" + + "4b477f04d947bd53c473799b277", url) + }) + it("is able to return urls without a branch for the browser", function () { + var url = getUrl( + "component/entejs", true) + + assert.equal("https://github.com/component/entejs", url) + }) + }) }) diff --git a/deps/npm/node_modules/lockfile/README.md b/deps/npm/node_modules/lockfile/README.md index 59e149b3f8..b3adccef1a 100644 --- a/deps/npm/node_modules/lockfile/README.md +++ b/deps/npm/node_modules/lockfile/README.md @@ -64,9 +64,14 @@ Callback is called with `cb(error, isLocked)`. ### opts.wait A number of milliseconds to wait for locks to expire before giving up. -Only used by lockFile.lock. Relies on fs.watch. If the lock is not -cleared by the time the wait expires, then it returns with the original -error. +Only used by lockFile.lock. Poll for `opts.wait` ms. If the lock is +not cleared by the time the wait expires, then it returns with the +original error. + +### opts.pollPeriod + +When using `opts.wait`, this is the period in ms in which it polls to +check if the lock has expired. Defaults to `100`. ### opts.stale diff --git a/deps/npm/node_modules/lockfile/lockfile.js b/deps/npm/node_modules/lockfile/lockfile.js index b82f1f0d65..0c2c6f597a 100644 --- a/deps/npm/node_modules/lockfile/lockfile.js +++ b/deps/npm/node_modules/lockfile/lockfile.js @@ -7,9 +7,9 @@ if (process.version.match(/^v0\.[0-6]/)) { } var os = require('os') -var filetime = 'ctime' +exports.filetime = 'ctime' if (os.platform() == "win32") { - filetime = 'mtime' + exports.filetime = 'mtime' } var debug @@ -92,7 +92,7 @@ exports.check = function (path, opts, cb) { }) fs.close(fd, function (er) { - var age = Date.now() - st[filetime].getTime() + var age = Date.now() - st[exports.filetime].getTime() return cb(er, age <= opts.stale) }) }) @@ -125,29 +125,39 @@ exports.checkSync = function (path, opts) { } finally { fs.closeSync(fd) } - var age = Date.now() - st[filetime].getTime() + var age = Date.now() - st[exports.filetime].getTime() return (age <= opts.stale) } } -var req = 0 +var req = 1 exports.lock = function (path, opts, cb) { if (typeof opts === 'function') cb = opts, opts = {} opts.req = opts.req || req++ debug('lock', path, opts) + opts.start = opts.start || Date.now() if (typeof opts.retries === 'number' && opts.retries > 0) { - cb = (function (orig) { return function (er, fd) { - if (!er) return orig(er, fd) - var newRT = opts.retries - 1 - opts_ = Object.create(opts, { retries: { value: newRT }}) - debug('lock retry', path, newRT) - if (opts.retryWait) setTimeout(function() { - exports.lock(path, opts_, orig) - }, opts.retryWait) - else exports.lock(path, opts_, orig) + debug('has retries', opts.retries) + var retries = opts.retries + opts.retries = 0 + cb = (function (orig) { return function cb (er, fd) { + debug('retry-mutated callback') + retries -= 1 + if (!er || retries < 0) return orig(er, fd) + + debug('lock retry', path, opts) + + if (opts.retryWait) setTimeout(retry, opts.retryWait) + else retry() + + function retry () { + opts.start = Date.now() + debug('retrying', opts.start) + exports.lock(path, opts, cb) + } }})(cb) } @@ -167,30 +177,57 @@ exports.lock = function (path, opts, cb) { if (er.code !== 'EEXIST') return cb(er) // someone's got this one. see if it's valid. - if (opts.stale) fs.stat(path, function (statEr, st) { - if (statEr) { - if (statEr.code === 'ENOENT') { - // expired already! - var opts_ = Object.create(opts, { stale: { value: false }}) - debug('lock stale enoent retry', path, opts_) - exports.lock(path, opts_, cb) - return - } - return cb(statEr) + if (!opts.stale) return notStale(er, path, opts, cb) + + return maybeStale(er, path, opts, false, cb) + }) +} + + +// Staleness checking algorithm +// 1. acquire $lock, fail +// 2. stat $lock, find that it is stale +// 3. acquire $lock.STALE +// 4. stat $lock, assert that it is still stale +// 5. unlink $lock +// 6. link $lock.STALE $lock +// 7. unlink $lock.STALE +// On any failure, clean up whatever we've done, and raise the error. +function maybeStale (originalEr, path, opts, hasStaleLock, cb) { + fs.stat(path, function (statEr, st) { + if (statEr) { + if (statEr.code === 'ENOENT') { + // expired already! + opts.stale = false + debug('lock stale enoent retry', path, opts) + exports.lock(path, opts, cb) + return } + return cb(statEr) + } - var age = Date.now() - st[filetime].getTime() - if (age > opts.stale) { - debug('lock stale', path, opts_) - exports.unlock(path, function (er) { - if (er) return cb(er) - var opts_ = Object.create(opts, { stale: { value: false }}) - debug('lock stale retry', path, opts_) - exports.lock(path, opts_, cb) + var age = Date.now() - st[exports.filetime].getTime() + if (age <= opts.stale) return notStale(originalEr, path, opts, cb) + + debug('lock stale', path, opts) + if (hasStaleLock) { + exports.unlock(path, function (er) { + if (er) return cb(er) + debug('lock stale retry', path, opts) + fs.link(path + '.STALE', path, function (er) { + fs.unlink(path + '.STALE', function () { + // best effort. if the unlink fails, oh well. + cb(er) + }) }) - } else notStale(er, path, opts, cb) - }) - else notStale(er, path, opts, cb) + }) + } else { + debug('acquire .STALE file lock', opts) + exports.lock(path + '.STALE', opts, function (er) { + if (er) return cb(er) + maybeStale(originalEr, path, opts, true, cb) + }) + } }) } @@ -201,20 +238,22 @@ function notStale (er, path, opts, cb) { if (typeof opts.wait !== 'number' || opts.wait <= 0) return cb(er) - // console.error('wait', path, opts.wait) - // wait for some ms for the lock to clear - var start = Date.now() + // poll for some ms for the lock to clear + var now = Date.now() + var start = opts.start || now var end = start + opts.wait - function retry () { - debug('notStale retry', path, opts) - var now = Date.now() - var newWait = end - now - var newOpts = Object.create(opts, { wait: { value: newWait }}) - exports.lock(path, newOpts, cb) - } + if (end <= now) + return cb(er) - var timer = setTimeout(retry, 100) + debug('now=%d, wait until %d (delta=%d)', start, end, end-start) + var wait = Math.min(end - start, opts.pollPeriod || 100) + var timer = setTimeout(poll, wait) + + function poll () { + debug('notStale, polling', path, opts) + exports.lock(path, opts, cb) + } } exports.lockSync = function (path, opts) { @@ -236,7 +275,7 @@ exports.lockSync = function (path, opts) { if (opts.stale) { var st = fs.statSync(path) - var ct = st[filetime].getTime() + var ct = st[exports.filetime].getTime() if (!(ct % 1000) && (opts.stale % 1000)) { // probably don't have subsecond resolution. // round up the staleness indicator. @@ -264,8 +303,8 @@ function retryThrow (path, opts, er) { if (typeof opts.retries === 'number' && opts.retries > 0) { var newRT = opts.retries - 1 debug('retryThrow', path, opts, newRT) - var opts_ = Object.create(opts, { retries: { value: newRT }}) - return exports.lockSync(path, opts_) + opts.retries = newRT + return exports.lockSync(path, opts) } throw er } diff --git a/deps/npm/node_modules/lockfile/package.json b/deps/npm/node_modules/lockfile/package.json index 39d9a857cd..bf4a90dcfb 100644 --- a/deps/npm/node_modules/lockfile/package.json +++ b/deps/npm/node_modules/lockfile/package.json @@ -1,6 +1,6 @@ { "name": "lockfile", - "version": "0.4.2", + "version": "1.0.0", "main": "lockfile.js", "directories": { "test": "test" @@ -31,15 +31,14 @@ }, "license": "BSD", "description": "A very polite lock file utility, which endeavors to not litter, and to wait patiently for others.", - "readme": "# lockfile\n\nA very polite lock file utility, which endeavors to not litter, and to\nwait patiently for others.\n\n## Usage\n\n```javascript\nvar lockFile = require('lockfile')\n\n// opts is optional, and defaults to {}\nlockFile.lock('some-file.lock', opts, function (er) {\n // if the er happens, then it failed to acquire a lock.\n // if there was not an error, then the file was created,\n // and won't be deleted until we unlock it.\n\n // do my stuff, free of interruptions\n // then, some time later, do:\n lockFile.unlock('some-file.lock', function (er) {\n // er means that an error happened, and is probably bad.\n })\n})\n```\n\n## Methods\n\nSync methods return the value/throw the error, others don't. Standard\nnode fs stuff.\n\nAll known locks are removed when the process exits. Of course, it's\npossible for certain types of failures to cause this to fail, but a best\neffort is made to not be a litterbug.\n\n### lockFile.lock(path, [opts], cb)\n\nAcquire a file lock on the specified path\n\n### lockFile.lockSync(path, [opts])\n\nAcquire a file lock on the specified path\n\n### lockFile.unlock(path, cb)\n\nClose and unlink the lockfile.\n\n### lockFile.unlockSync(path)\n\nClose and unlink the lockfile.\n\n### lockFile.check(path, [opts], cb)\n\nCheck if the lockfile is locked and not stale.\n\nReturns boolean.\n\n### lockFile.checkSync(path, [opts], cb)\n\nCheck if the lockfile is locked and not stale.\n\nCallback is called with `cb(error, isLocked)`.\n\n## Options\n\n### opts.wait\n\nA number of milliseconds to wait for locks to expire before giving up.\nOnly used by lockFile.lock. Relies on fs.watch. If the lock is not\ncleared by the time the wait expires, then it returns with the original\nerror.\n\n### opts.stale\n\nA number of milliseconds before locks are considered to have expired.\n\n### opts.retries\n\nUsed by lock and lockSync. Retry `n` number of times before giving up.\n\n### opts.retryWait\n\nUsed by lock. Wait `n` milliseconds before retrying.\n", + "readme": "# lockfile\n\nA very polite lock file utility, which endeavors to not litter, and to\nwait patiently for others.\n\n## Usage\n\n```javascript\nvar lockFile = require('lockfile')\n\n// opts is optional, and defaults to {}\nlockFile.lock('some-file.lock', opts, function (er) {\n // if the er happens, then it failed to acquire a lock.\n // if there was not an error, then the file was created,\n // and won't be deleted until we unlock it.\n\n // do my stuff, free of interruptions\n // then, some time later, do:\n lockFile.unlock('some-file.lock', function (er) {\n // er means that an error happened, and is probably bad.\n })\n})\n```\n\n## Methods\n\nSync methods return the value/throw the error, others don't. Standard\nnode fs stuff.\n\nAll known locks are removed when the process exits. Of course, it's\npossible for certain types of failures to cause this to fail, but a best\neffort is made to not be a litterbug.\n\n### lockFile.lock(path, [opts], cb)\n\nAcquire a file lock on the specified path\n\n### lockFile.lockSync(path, [opts])\n\nAcquire a file lock on the specified path\n\n### lockFile.unlock(path, cb)\n\nClose and unlink the lockfile.\n\n### lockFile.unlockSync(path)\n\nClose and unlink the lockfile.\n\n### lockFile.check(path, [opts], cb)\n\nCheck if the lockfile is locked and not stale.\n\nReturns boolean.\n\n### lockFile.checkSync(path, [opts], cb)\n\nCheck if the lockfile is locked and not stale.\n\nCallback is called with `cb(error, isLocked)`.\n\n## Options\n\n### opts.wait\n\nA number of milliseconds to wait for locks to expire before giving up.\nOnly used by lockFile.lock. Poll for `opts.wait` ms. If the lock is\nnot cleared by the time the wait expires, then it returns with the\noriginal error.\n\n### opts.pollPeriod\n\nWhen using `opts.wait`, this is the period in ms in which it polls to\ncheck if the lock has expired. Defaults to `100`.\n\n### opts.stale\n\nA number of milliseconds before locks are considered to have expired.\n\n### opts.retries\n\nUsed by lock and lockSync. Retry `n` number of times before giving up.\n\n### opts.retryWait\n\nUsed by lock. Wait `n` milliseconds before retrying.\n", "readmeFilename": "README.md", + "gitHead": "9590c6f02521eb1bb154ddc3ca9a7e84ce770c45", "bugs": { "url": "https://github.com/isaacs/lockfile/issues" }, - "_id": "lockfile@0.4.2", - "dist": { - "shasum": "ab91f5d3745bc005ae4fa34d078910d1f2b9612d" - }, - "_from": "lockfile@0.4.2", - "_resolved": "https://registry.npmjs.org/lockfile/-/lockfile-0.4.2.tgz" + "homepage": "https://github.com/isaacs/lockfile", + "_id": "lockfile@1.0.0", + "_shasum": "b3a7609dda6012060083bacb0ab0ecbca58e9203", + "_from": "lockfile@latest" } diff --git a/deps/npm/node_modules/lockfile/test/basic.js b/deps/npm/node_modules/lockfile/test/basic.js index 23e8248796..bc66cc3531 100644 --- a/deps/npm/node_modules/lockfile/test/basic.js +++ b/deps/npm/node_modules/lockfile/test/basic.js @@ -4,6 +4,11 @@ var path = require('path') var fs = require('fs') var touch = require('touch') +// On Unix systems, it uses ctime by default for staleness checks, since it's +// the most reliable. However, because this test artificially sets some locks +// to an earlier time to simulate staleness, we use mtime here. +lockFile.filetime = 'mtime' + test('setup', function (t) { try { lockFile.unlockSync('basic-lock') } catch (er) {} try { lockFile.unlockSync('sync-lock') } catch (er) {} @@ -127,36 +132,35 @@ test('staleness test', function (t) { lockFile.lock('stale-lock', function (er) { if (er) throw er + // simulate 2s old + touch.sync('stale-lock', { time: new Date(Date.now() - 2000) }) + var opts = { stale: 1 } - setTimeout(next, 1000) - function next () { - lockFile.check('stale-lock', opts, function (er, locked) { + lockFile.check('stale-lock', opts, function (er, locked) { + if (er) throw er + t.notOk(locked) + lockFile.lock('stale-lock', opts, function (er) { if (er) throw er - t.notOk(locked) - lockFile.lock('stale-lock', opts, function (er) { + lockFile.unlock('stale-lock', function (er) { if (er) throw er - lockFile.unlock('stale-lock', function (er) { - if (er) throw er - t.end() - }) + t.end() }) }) - } + }) }) }) test('staleness sync test', function (t) { var opts = { stale: 1 } lockFile.lockSync('stale-lock') - setTimeout(next, 1000) - function next () { - var locked - locked = lockFile.checkSync('stale-lock', opts) - t.notOk(locked) - lockFile.lockSync('stale-lock', opts) - lockFile.unlockSync('stale-lock') - t.end() - } + // simulate 2s old + touch.sync('stale-lock', { time: new Date(Date.now() - 2000) }) + var locked + locked = lockFile.checkSync('stale-lock', opts) + t.notOk(locked) + lockFile.lockSync('stale-lock', opts) + lockFile.unlockSync('stale-lock') + t.end() }) test('retries', function (t) { @@ -238,7 +242,7 @@ test('wait and stale together', function (t) { }, 10) // try to get another lock. this must fail! - var opt = { stale: 1000, wait: 2000 } + var opt = { stale: 1000, wait: 2000, pollInterval: 1000 } lockFile.lock('stale-wait-lock', opt, function (er) { if (!er) t.fail('got second lock? that unpossible!') @@ -256,21 +260,20 @@ test('stale windows file tunneling test', function (t) { // nt file system tunneling feature will make file creation time not updated var opts = { stale: 1000 } lockFile.lockSync('stale-windows-lock') - setTimeout(next, 2000) - function next () { - var locked - lockFile.unlockSync('stale-windows-lock') - lockFile.lockSync('stale-windows-lock', opts) - locked = lockFile.checkSync('stale-windows-lock', opts) - t.ok(locked, "should be locked and not stale") - lockFile.lock('stale-windows-lock', opts, function (er) { - if (!er) - t.fail('got second lock? impossible, windows file tunneling problem!') - else - t.pass('second lock failed, windows file tunneling problem fixed') - t.end() - }) - } + touch.sync('stale-windows-lock', { time: new Date(Date.now() - 3000) }) + + var locked + lockFile.unlockSync('stale-windows-lock') + lockFile.lockSync('stale-windows-lock', opts) + locked = lockFile.checkSync('stale-windows-lock', opts) + t.ok(locked, "should be locked and not stale") + lockFile.lock('stale-windows-lock', opts, function (er) { + if (!er) + t.fail('got second lock? impossible, windows file tunneling problem!') + else + t.pass('second lock failed, windows file tunneling problem fixed') + t.end() + }) }) @@ -283,7 +286,7 @@ test('cleanup', function (t) { try { lockFile.unlockSync('retry-lock') } catch (er) {} try { lockFile.unlockSync('contentious-lock') } catch (er) {} try { lockFile.unlockSync('stale-wait-lock') } catch (er) {} - try { lockFile.unlockSync('stale-windows-lock') } catch (er) {} + try { lockFile.unlockSync('stale-windows-lock') } catch (er) {} t.end() }) diff --git a/deps/npm/node_modules/lockfile/test/retry-time.js b/deps/npm/node_modules/lockfile/test/retry-time.js new file mode 100644 index 0000000000..160bc1376d --- /dev/null +++ b/deps/npm/node_modules/lockfile/test/retry-time.js @@ -0,0 +1,62 @@ +// In these tests, we do the following: +// try for 200ms (rt=2) +// wait for 300ms +// try for 200ms (rt=1) +// wait for 300ms +// try for 200ms (rt=0) +// fail after 1200 +// Actual time will be more like 1220-ish for setTimeout irregularity +// But it should NOT be as slow as 2000. + +var lockFile = require('../') +var touch = require('touch') +var test = require('tap').test +var fs = require('fs') + +var RETRYWAIT = 100 +var WAIT = 100 +var RETRIES = 2 +var EXPECTTIME = (RETRYWAIT * RETRIES) + (WAIT * (RETRIES + 1)) +var TOOLONG = EXPECTTIME * 1.1 + +test('setup', function (t) { + touch.sync('file.lock') + t.end() +}) + +var pollPeriods = [10, 100, 10000] +pollPeriods.forEach(function (pp) { + test('retry+wait, poll=' + pp, function (t) { + var ended = false + var timer = setTimeout(function() { + t.fail('taking too long!') + ended = true + t.end() + }, 2000) + timer.unref() + + var start = Date.now() + lockFile.lock('file.lock', { + wait: WAIT, + retries: RETRIES, + retryWait: RETRYWAIT, + pollPeriod: pp + }, function (er) { + if (ended) return + var time = Date.now() - start + console.error('t=%d', time) + t.ok(time >= EXPECTTIME, 'should take at least ' + EXPECTTIME) + t.ok(time < TOOLONG, 'should take less than ' + TOOLONG) + clearTimeout(timer) + t.end() + }) + }) +}) + +test('cleanup', function (t) { + fs.unlinkSync('file.lock') + t.end() + setTimeout(function() { + process.exit(1) + }, 500).unref() +}) diff --git a/deps/npm/node_modules/lockfile/test/stale-contention.js b/deps/npm/node_modules/lockfile/test/stale-contention.js new file mode 100644 index 0000000000..85cbf92e93 --- /dev/null +++ b/deps/npm/node_modules/lockfile/test/stale-contention.js @@ -0,0 +1,85 @@ +var fs = require('fs') +var lockFile = require('../') +var test = require('tap').test +var path = require('path') +var lock = path.resolve(__dirname, 'stale.lock') +var touch = require('touch') +var spawn = require('child_process').spawn +var node = process.execPath + +// We're using a lockfile with an artificially old date, +// so make it use that instead of ctime. +// Probably you should never do this in production! +lockFile.filetime = 'mtime' + +if (process.argv[2] === 'child') { + return child() +} + +function child () { + // Make fs.stat take 100ms to return its data + // This is important because, in a test scenario where + // we're statting the same exact file rapid-fire like this, + // it'll end up being cached by the FS, and never trigger + // the race condition we're trying to expose. + fs.stat = function (stat) { return function () { + var args = [].slice.call(arguments) + var cb = args.pop() + stat.apply(fs, args.concat(function(er, st) { + setTimeout(function () { + cb(er, st) + }, 100) + })) + }}(fs.stat) + + lockFile.lock(lock, { stale: 100000 }, function (er) { + if (er && er.code !== 'EEXIST') + throw er + else if (er) + process.exit(17) + else + setTimeout(function(){}, 500) + }) +} + +test('create stale file', function (t) { + try { fs.unlinkSync(lock) } catch (er) {} + touch.sync(lock, { time: '1979-07-01T19:10:00.000Z' }) + t.end() +}) + +test('contenders', function (t) { + var n = 10 + var fails = 0 + var wins = 0 + var args = [ __filename, 'child' ] + var opt = { stdio: [0, "pipe", 2] } + for (var i = 0; i < n; i++) { + spawn(node, args, opt).on('close', then) + } + + function then (code) { + if (code === 17) { + fails ++ + } else if (code) { + t.fail("unexpected failure", code) + fails ++ + } else { + wins ++ + } + if (fails + wins === n) { + done() + } + } + + function done () { + t.equal(wins, 1, "should have 1 lock winner") + t.equal(fails, n - 1, "all others should lose") + t.end() + } +}) + +test('remove stale file', function (t) { + try { fs.unlinkSync(lock) } catch (er) {} + t.end() +}) 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 bad31b7ea6..7a770a6d22 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/request.js +++ b/deps/npm/node_modules/npm-registry-client/lib/request.js @@ -109,7 +109,11 @@ function regRequest (method, uri, options, cb_) { } if (auth && authRequired) { - remote.auth = new Buffer(auth, "base64").toString("utf8") + // Escape any weird characters that might be in the auth string + // TODO(isaacs) Clean up this awful back and forth mess. + var remoteAuth = new Buffer(auth, "base64").toString("utf8") + remoteAuth = encodeURIComponent(remoteAuth).replace(/%3A/, ":") + remote.auth = remoteAuth } // Tuned to spread 3 attempts over about a minute. @@ -143,8 +147,12 @@ function regRequest (method, uri, options, cb_) { self.log.info("retry", "will retry, error on last attempt: " + er) return } - if (response) + if (response) { this.log.verbose("headers", response.headers) + if (response.headers["npm-notice"]) { + this.log.warn("notice", response.headers["npm-notice"]) + } + } cb.apply(null, arguments) }.bind(this)) }.bind(this)) diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json index bb7c5b5544..6d29da9ddf 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": "2.0.4", + "version": "2.0.7", "repository": { "url": "git://github.com/isaacs/npm-registry-client" }, @@ -33,33 +33,14 @@ "npmlog": "" }, "license": "ISC", - "gitHead": "a10f621d9cdc813b9d3092a14b661f65bfa6d40d", + "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 options = {timeout: 1000}\n\nclient.get(uri, options, 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 (for the base URL, any path\nwill be ignored). In addition to `http` and `https`, `npm` URLs are allowed.\n`npm` URLs are `https` URLs with the additional restrictions that they will\nalways include authorization credentials, and the response is always registry\nmetadata (and not tarballs or other attachments).\n\n# Configuration\n\nThis program is designed to work with\n[npmconf](https://npmjs.org/package/npmconf), but you can also pass in\na plain-jane object with the appropriate configs, and it'll shim it\nfor you. Any configuration thingie that has get/set/del methods will\nalso be accepted.\n\n* `cache` **Required** {String} Path to the cache folder\n* `always-auth` {Boolean} Auth even for GET requests.\n* `auth` {String} A base64-encoded `username:password`\n* `email` {String} User's email address\n* `tag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `ca` {String} Cerficate signing authority certificates to trust.\n* `cert` {String} Client certificate (PEM encoded). Enable access\n to servers that require client certificates\n* `key` {String} Private key (PEM encoded) for client certificate 'cert'\n* `strict-ssl` {Boolean} Whether or not to be strict with SSL\n certificates. Default = `true`\n* `user-agent` {String} User agent header to send. Default =\n `\"node/{process.version} {process.platform} {process.arch}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `fetch-retries` {Number} Number of times to retry on GET failures.\n Default=2\n* `fetch-retry-factor` {Number} `factor` setting for `node-retry`. Default=10\n* `fetch-retry-mintimeout` {Number} `minTimeout` setting for `node-retry`.\n Default=10000 (10 seconds)\n* `fetch-retry-maxtimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default=60000 (60 seconds)\n* `proxy` {URL} The url to proxy requests through.\n* `https-proxy` {URL} The url to proxy https requests through.\n Defaults to be the same as `proxy` if unset.\n* `_auth` {String} The base64-encoded authorization header.\n* `username` `_password` {String} Username/password to use to generate\n `_auth` if not supplied.\n* `_token` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login)\n\n# client.request(method, uri, options, cb)\n\n* `method` {String} HTTP method\n* `uri` {String} URI pointing to the resource to request\n* `options` {Object} Object containing optional per-request properties.\n * `what` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON.\n * `etag` {String} The cached ETag\n * `follow` {Boolean} Follow 302/301 responses (defaults to true)\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a request to the registry. All the other methods are wrappers around\n`request`.\n\n# client.adduser(base, username, password, email, cb)\n\n* `base` {String} Base registry URL\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `cb` {Function}\n\nAdd a user account to the registry, or verify the credentials.\n\n# client.deprecate(uri, version, message, cb)\n\n* `uri` {String} Full registry URI for the deprecated package\n* `version` {String} Semver version range\n* `message` {String} The message to use as a deprecation warning\n* `cb` {Function}\n\nDeprecate a version of a package in the registry.\n\n# client.bugs(uri, cb)\n\n* `uri` {String} Full registry URI for the package\n* `cb` {Function}\n\nGet the url for bugs of a package\n\n# client.get(uri, options, cb)\n\n* `uri` {String} The complete registry URI to fetch\n* `options` {Object} Object containing optional per-request properties.\n * `timeout` {Number} Duration before the request times out.\n * `follow` {Boolean} Follow 302/301 responses (defaults to true)\n * `staleOk` {Boolean} If there's cached data available, then return that\n to the callback quickly, and update the cache the background.\n\nFetches data from the registry via a GET request, saving it in the cache folder\nwith the ETag.\n\n# client.publish(uri, data, tarball, cb)\n\n* `uri` {String} The registry URI to publish to\n* `data` {Object} Package data\n* `tarball` {String | Stream} Filename or stream of the package tarball\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder. However, it can\naccept a gzipped tar stream or a filename to a tarball.\n\n# client.star(uri, starred, cb)\n\n* `uri` {String} The complete registry URI to star\n* `starred` {Boolean} True to star the package, false to unstar it.\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or unstar a\npackage, though other writes do require that the user be the package owner.\n\n# client.stars(base, username, cb)\n\n* `base` {String} The base URL for the registry\n* `username` {String} Name of user to fetch starred packages for.\n* `cb` {Function}\n\nView your own or another user's starred packages.\n\n# client.tag(uri, version, tag, cb)\n\n* `uri` {String} The complete registry URI to tag\n* `version` {String} Version to tag\n* `tag` {String} Tag name to apply\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the\nspecified version.\n\n# client.unpublish(uri, [ver], cb)\n\n* `uri` {String} The complete registry URI to unpublish\n* `ver` {String} version to unpublish. Leave blank to unpublish all\n versions.\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When the\nlast version us unpublished, the entire document is removed from the database.\n\n# client.upload(uri, file, [etag], [nofollow], cb)\n\n* `uri` {String} The complete registry URI to upload to\n* `file` {String | Stream} Either the filename or a readable stream\n* `etag` {String} Cache ETag\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `cb` {Function}\n\nUpload an attachment. Mostly used by `client.publish()`.\n", + "readmeFilename": "README.md", + "gitHead": "bb534a209f9a36d77aff57cd4318ba3985501360", "bugs": { "url": "https://github.com/isaacs/npm-registry-client/issues" }, "homepage": "https://github.com/isaacs/npm-registry-client", - "_id": "npm-registry-client@2.0.4", - "_shasum": "528e08900d7655c12096d1637d1c3a7a5b451019", - "_from": "npm-registry-client@2.0.4", - "_npmVersion": "1.4.22", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - } - ], - "dist": { - "shasum": "528e08900d7655c12096d1637d1c3a7a5b451019", - "tarball": "http://registry.npmjs.org/npm-registry-client/-/npm-registry-client-2.0.4.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-2.0.4.tgz" + "_id": "npm-registry-client@2.0.7", + "_shasum": "97a2cdca5aba753b4b5b334b4ae65669c6641085", + "_from": "npm-registry-client@^2.0.7" } diff --git a/deps/npm/node_modules/npm-registry-client/test/adduser-new.js b/deps/npm/node_modules/npm-registry-client/test/adduser-new.js index 6cedf94d14..57dca0b520 100644 --- a/deps/npm/node_modules/npm-registry-client/test/adduser-new.js +++ b/deps/npm/node_modules/npm-registry-client/test/adduser-new.js @@ -4,7 +4,7 @@ var server = require("./lib/server.js") var common = require("./lib/common.js") var client = common.freshClient() -var password = "password" +var password = "%1234@asdf%" , username = "username" , email = "i@izs.me" , userdata = { diff --git a/deps/npm/node_modules/npm-registry-client/test/adduser-update.js b/deps/npm/node_modules/npm-registry-client/test/adduser-update.js index 551c9843ed..2c5ccde6ea 100644 --- a/deps/npm/node_modules/npm-registry-client/test/adduser-update.js +++ b/deps/npm/node_modules/npm-registry-client/test/adduser-update.js @@ -4,7 +4,7 @@ var server = require("./lib/server.js") var common = require("./lib/common.js") var client = common.freshClient() -var password = "password" +var password = "%1234@asdf%" , username = "username" , email = "i@izs.me" , userdata = { diff --git a/deps/npm/node_modules/npm-registry-client/test/bugs.js b/deps/npm/node_modules/npm-registry-client/test/bugs.js index 092ec9f791..a7336b4a58 100644 --- a/deps/npm/node_modules/npm-registry-client/test/bugs.js +++ b/deps/npm/node_modules/npm-registry-client/test/bugs.js @@ -4,9 +4,9 @@ var server = require("./lib/server.js") var common = require("./lib/common.js") var client = common.freshClient({ username : "username", - password : "password", + password : "%1234@asdf%", email : "ogd@aoaioxxysz.net", - _auth : new Buffer("username : password").toString("base64"), + _auth : new Buffer("username:%1234@asdf%").toString("base64"), "always-auth" : true }) diff --git a/deps/npm/node_modules/npm-registry-client/test/deprecate.js b/deps/npm/node_modules/npm-registry-client/test/deprecate.js index 52c21b2f8e..29d33742c7 100644 --- a/deps/npm/node_modules/npm-registry-client/test/deprecate.js +++ b/deps/npm/node_modules/npm-registry-client/test/deprecate.js @@ -6,7 +6,7 @@ var client = common.freshClient({ username : "username", password : "password", email : "ogd@aoaioxxysz.net", - _auth : new Buffer("username : password").toString("base64"), + _auth : new Buffer("username:%1234@asdf%").toString("base64"), "always-auth" : true }) diff --git a/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/cache.json b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/cache.json deleted file mode 100644 index 01da300276..0000000000 --- a/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/1.3.3/cache.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"47ac53683daf832bfa952e1774417da47817ae42","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.3.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}} \ No newline at end of file diff --git a/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/cache.json b/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/cache.json deleted file mode 100644 index d899f11922..0000000000 --- a/deps/npm/node_modules/npm-registry-client/test/fixtures/underscore/cache.json +++ /dev/null @@ -1 +0,0 @@ -{"_id":"underscore","_rev":"72-47f2986bfd8e8b55068b204588bbf484","name":"underscore","description":"JavaScript's functional programming helper library.","dist-tags":{"latest":"1.3.3","stable":"1.3.3"},"versions":{"1.0.3":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.0.3","_id":"underscore@1.0.3","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.0.3.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.0.4":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.0.4","_id":"underscore@1.0.4","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.0.4.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.0":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.0","_id":"underscore@1.1.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.0.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.1":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.1","_id":"underscore@1.1.1","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.1.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.2":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.2","_id":"underscore@1.1.2","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.2.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.3":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore","version":"1.1.3","_id":"underscore@1.1.3","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.8-1","_nodeVersion":"v0.2.5","dist":{"tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.3.tgz"},"directories":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.4":{"name":"underscore","description":"Functional programming aid for JavaScript. Works well with jQuery.","url":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"lib":".","main":"underscore.js","version":"1.1.4","_id":"underscore@1.1.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.9","_nodeVersion":"v0.5.0-pre","dist":{"shasum":"9e82274902865625b3a6d4c315a38ffd80047dae","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.4.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.1.5":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.5","_id":"underscore@1.1.5","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.16","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"23601d62c75619998b2f0db24938102793336a56","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.5.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.6":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.6","_id":"underscore@1.1.6","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.2","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"6868da1bdd72d75285be0b4e50f228e70d001a2c","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.6.tgz"},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}]},"1.1.7":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.1.7","devDependencies":{},"_id":"underscore@1.1.7","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.3","_nodeVersion":"v0.4.7","_defaultsLoaded":true,"dist":{"shasum":"40bab84bad19d230096e8d6ef628bff055d83db0","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.1.7.tgz"},"scripts":{},"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.0","_npmJsonOpts":{"file":"/Users/jashkenas/.npm/underscore/1.2.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"underscore@1.2.0","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"b32ce32c8c118caa8031c10b54c7f65ab3b557fd","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.0.tgz"},"scripts":{},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"directories":{}},"1.2.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.1","_npmJsonOpts":{"file":"/Users/jashkenas/.npm/underscore/1.2.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"underscore@1.2.1","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.22","_nodeVersion":"v0.4.10","_defaultsLoaded":true,"dist":{"shasum":"fc5c6b0765673d92a2d4ac8b4dc0aa88702e2bd4","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.1.tgz"},"scripts":{},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"directories":{}},"1.2.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.2","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.2","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"74dd40e9face84e724eb2edae945b8aedc233ba3","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.2.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"dependencies":{},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.3","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.0","_defaultsLoaded":true,"dist":{"shasum":"11b874da70f4683d7d48bba2b44be1e600d2f6cf","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.3.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.2.4":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.2.4","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.2.4","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"e8da6241aa06f64df2473bb2590b8c17c84c3c7e","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.2.4.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.0":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"contributors":[],"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.0","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.0","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"253b2d79b7bb67943ced0fc744eb18267963ede8","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.0.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.1":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.1","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.1","dependencies":{},"devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.104","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"6cb8aad0e77eb5dbbfb54b22bcd8697309cf9641","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.1.tgz"},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.2":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.2","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.2","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"1b4e455089ab1d1d38ab6794ffe6cf08f764394a","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.2.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}},"1.3.3":{"name":"underscore","description":"JavaScript's functional programming helper library.","homepage":"http://documentcloud.github.com/underscore/","keywords":["util","functional","server","client","browser"],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"main":"underscore.js","version":"1.3.3","_npmUser":{"name":"jashkenas","email":"jashkenas@gmail.com"},"_id":"underscore@1.3.3","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.1","_nodeVersion":"v0.6.11","_defaultsLoaded":true,"dist":{"shasum":"47ac53683daf832bfa952e1774417da47817ae42","tarball":"http://registry.npmjs.org/underscore/-/underscore-1.3.3.tgz"},"readme":" __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n \nUnderscore.js is a utility-belt library for JavaScript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n","maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"directories":{}}},"maintainers":[{"name":"documentcloud","email":"jeremy@documentcloud.org"},{"name":"jashkenas","email":"jashkenas@gmail.com"}],"author":{"name":"Jeremy Ashkenas","email":"jeremy@documentcloud.org"},"time":{"1.0.3":"2011-12-07T15:12:18.045Z","1.0.4":"2011-12-07T15:12:18.045Z","1.1.0":"2011-12-07T15:12:18.045Z","1.1.1":"2011-12-07T15:12:18.045Z","1.1.2":"2011-12-07T15:12:18.045Z","1.1.3":"2011-12-07T15:12:18.045Z","1.1.4":"2011-12-07T15:12:18.045Z","1.1.5":"2011-12-07T15:12:18.045Z","1.1.6":"2011-12-07T15:12:18.045Z","1.1.7":"2011-12-07T15:12:18.045Z","1.2.0":"2011-12-07T15:12:18.045Z","1.2.1":"2011-12-07T15:12:18.045Z","1.2.2":"2011-11-14T20:28:47.115Z","1.2.3":"2011-12-07T15:12:18.045Z","1.2.4":"2012-01-09T17:23:14.818Z","1.3.0":"2012-01-11T16:41:38.459Z","1.3.1":"2012-01-23T22:57:36.474Z","1.3.2":"2012-04-09T18:38:14.345Z","1.3.3":"2012-04-10T14:43:48.089Z"},"repository":{"type":"git","url":"git://github.com/documentcloud/underscore.git"},"users":{"vesln":true,"mvolkmann":true,"lancehunt":true,"mikl":true,"linus":true,"vasc":true,"bat":true,"dmalam":true,"mbrevoort":true,"danielr":true,"rsimoes":true,"thlorenz":true}} \ No newline at end of file diff --git a/deps/npm/node_modules/npm-registry-client/test/lib/server.js b/deps/npm/node_modules/npm-registry-client/test/lib/server.js index 03d3cd1fc6..b195d9a9b3 100644 --- a/deps/npm/node_modules/npm-registry-client/test/lib/server.js +++ b/deps/npm/node_modules/npm-registry-client/test/lib/server.js @@ -3,6 +3,7 @@ var http = require('http') var server = http.createServer(handler) var port = server.port = process.env.PORT || 1337 +var assert = require("assert") server.listen(port) module.exports = server @@ -12,6 +13,13 @@ server._expect = {} function handler (req, res) { req.connection.setTimeout(1000) + // If we got authorization, make sure it's the right password. + if (req.headers.authorization) { + var auth = req.headers.authorization.replace(/^Basic /, "") + auth = new Buffer(auth, "base64").toString("utf8") + assert.equal(auth, "username:%1234@asdf%") + } + var u = '* ' + req.url , mu = req.method + ' ' + req.url 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 af59980b3e..6d286fb7eb 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 @@ -5,9 +5,9 @@ var server = require("./lib/server.js") var common = require("./lib/common.js") var client = common.freshClient({ username: "username", - password: "password", + password: "%1234@asdf%", email: "i@izs.me", - _auth: new Buffer("username:password").toString("base64"), + _auth: new Buffer("username:%1234@asdf%").toString("base64"), "always-auth": true }) 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 a6233905f3..c34bf6c534 100644 --- a/deps/npm/node_modules/npm-registry-client/test/publish.js +++ b/deps/npm/node_modules/npm-registry-client/test/publish.js @@ -6,9 +6,9 @@ var server = require("./lib/server.js") var common = require("./lib/common.js") var client = common.freshClient({ username: "username", - password: "password", + password: "%1234@asdf%", email: "i@izs.me", - _auth: new Buffer("username:password").toString("base64"), + _auth: new Buffer("username:%1234@asdf%").toString("base64"), "always-auth": true }) diff --git a/deps/npm/node_modules/npm-registry-client/test/star.js b/deps/npm/node_modules/npm-registry-client/test/star.js index 3e140aae82..0e43e10d76 100644 --- a/deps/npm/node_modules/npm-registry-client/test/star.js +++ b/deps/npm/node_modules/npm-registry-client/test/star.js @@ -3,16 +3,16 @@ var tap = require("tap") var server = require("./lib/server.js") var common = require("./lib/common.js") var client = common.freshClient({ - username : "othiym23", - password : "password", + username : "username", + password : "%1234@asdf%", email : "ogd@aoaioxxysz.net", - _auth : new Buffer("username : password").toString("base64"), + _auth : new Buffer("username:%1234@asdf%").toString("base64"), "always-auth" : true }) var cache = require("./fixtures/underscore/cache.json") -var DEP_USER = "othiym23" +var DEP_USER = "username" tap.test("star a package", function (t) { server.expect("GET", "/underscore?write=true", function (req, res) { diff --git a/deps/npm/node_modules/npm-registry-client/test/stars.js b/deps/npm/node_modules/npm-registry-client/test/stars.js index 64835c02a6..ae1ddbb49d 100644 --- a/deps/npm/node_modules/npm-registry-client/test/stars.js +++ b/deps/npm/node_modules/npm-registry-client/test/stars.js @@ -4,9 +4,9 @@ var server = require("./lib/server.js") var common = require("./lib/common.js") var client = common.freshClient({ username : "username", - password : "password", + password : "%1234@asdf%", email : "ogd@aoaioxxysz.net", - _auth : new Buffer("username : password").toString("base64"), + _auth : new Buffer("username:%1234@asdf%").toString("base64"), "always-auth" : true }) 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 b8b8e19275..216ac6c520 100644 --- a/deps/npm/node_modules/npm-registry-client/test/tag.js +++ b/deps/npm/node_modules/npm-registry-client/test/tag.js @@ -4,9 +4,9 @@ var server = require("./lib/server.js") var common = require("./lib/common.js") var client = common.freshClient({ username : "username", - password : "password", + password : "%1234@asdf%", email : "ogd@aoaioxxysz.net", - _auth : new Buffer("username : password").toString("base64"), + _auth : new Buffer("username:%1234@asdf%").toString("base64"), "always-auth" : true }) diff --git a/deps/npm/node_modules/npm-registry-client/test/unpublish.js b/deps/npm/node_modules/npm-registry-client/test/unpublish.js index e8a209306d..47c5617c8a 100644 --- a/deps/npm/node_modules/npm-registry-client/test/unpublish.js +++ b/deps/npm/node_modules/npm-registry-client/test/unpublish.js @@ -3,10 +3,10 @@ var tap = require("tap") var server = require("./lib/server.js") var common = require("./lib/common.js") var client = common.freshClient({ - username : "othiym23", - password : "password", + username : "username", + password : "%1234@asdf%", email : "ogd@aoaioxxysz.net", - _auth : new Buffer("username : password").toString("base64"), + _auth : new Buffer("username:%1234@asdf%").toString("base64"), "always-auth" : true }) diff --git a/deps/npm/node_modules/npm-registry-client/test/upload.js b/deps/npm/node_modules/npm-registry-client/test/upload.js index 8884db8f33..434ad36f01 100644 --- a/deps/npm/node_modules/npm-registry-client/test/upload.js +++ b/deps/npm/node_modules/npm-registry-client/test/upload.js @@ -8,10 +8,10 @@ var server = require("./lib/server.js") var cache = require("./fixtures/underscore/cache.json") var client = common.freshClient({ - username : "othiym23", - password : "password", + username : "username", + password : "%1234@asdf%", email : "ogd@aoaioxxysz.net", - _auth : new Buffer("username : password").toString("base64"), + _auth : new Buffer("username:%1234@asdf%").toString("base64"), "always-auth" : true }) diff --git a/deps/npm/node_modules/npmconf/config-defs.js b/deps/npm/node_modules/npmconf/config-defs.js index 66f4f1b47c..31522fb643 100644 --- a/deps/npm/node_modules/npmconf/config-defs.js +++ b/deps/npm/node_modules/npmconf/config-defs.js @@ -192,7 +192,6 @@ Object.defineProperty(exports, "defaults", {get: function () { , "save-exact" : false , "save-optional" : false , "save-prefix": "^" - //, scope : "" , searchopts: "" , searchexclude: null , searchsort: "name" @@ -289,7 +288,6 @@ exports.types = , "save-exact" : Boolean , "save-optional" : Boolean , "save-prefix": String - //, scope : String , searchopts : String , searchexclude: [null, String] , searchsort: [ "name", "-name" diff --git a/deps/npm/node_modules/npmconf/npmconf.js b/deps/npm/node_modules/npmconf/npmconf.js index 248220a8fe..a17705447a 100644 --- a/deps/npm/node_modules/npmconf/npmconf.js +++ b/deps/npm/node_modules/npmconf/npmconf.js @@ -359,7 +359,8 @@ Conf.prototype.addEnv = function (env) { // leave first char untouched, even if // it is a "_" - convert all other to "-" - var p = k.replace(/^npm_config_/, '') + var p = k.toLowerCase() + .replace(/^npm_config_/, '') .replace(/(?!^)_/g, '-') conf[p] = env[k] }) diff --git a/deps/npm/node_modules/npmconf/package.json b/deps/npm/node_modules/npmconf/package.json index b62bde8d0c..55daab66e1 100644 --- a/deps/npm/node_modules/npmconf/package.json +++ b/deps/npm/node_modules/npmconf/package.json @@ -1,6 +1,6 @@ { "name": "npmconf", - "version": "1.1.5", + "version": "1.1.8", "description": "The config thing npm uses", "main": "npmconf.js", "directories": { @@ -40,32 +40,14 @@ "url": "http://blog.izs.me" }, "license": "ISC", - "gitHead": "73f125b2961d550bd9884d8945e653a9fe8066c6", + "readme": "# npmconf\n\nThe config thing npm uses\n\nIf you are interested in interacting with the config settings that npm\nuses, then use this module.\n\nHowever, if you are writing a new Node.js program, and want\nconfiguration functionality similar to what npm has, but for your\nown thing, then I'd recommend using [rc](https://github.com/dominictarr/rc),\nwhich is probably what you want.\n\nIf I were to do it all over again, that's what I'd do for npm. But,\nalas, there are many systems depending on many of the particulars of\nnpm's configuration setup, so it's not worth the cost of changing.\n\n## USAGE\n\n```javascript\nvar npmconf = require('npmconf')\n\n// pass in the cli options that you read from the cli\n// or whatever top-level configs you want npm to use for now.\nnpmconf.load({some:'configs'}, function (er, conf) {\n // do stuff with conf\n conf.get('some', 'cli') // 'configs'\n conf.get('username') // 'joebobwhatevers'\n conf.set('foo', 'bar', 'user')\n conf.save('user', function (er) {\n // foo = bar is now saved to ~/.npmrc or wherever\n })\n})\n```\n", + "readmeFilename": "README.md", + "gitHead": "98e8ed0e2a307470f8db14d2727a165d8524b567", "bugs": { "url": "https://github.com/isaacs/npmconf/issues" }, "homepage": "https://github.com/isaacs/npmconf", - "_id": "npmconf@1.1.5", - "_shasum": "07777bea48d78eed75a4258962a09f3dc7b6b916", - "_from": "npmconf@1.1.5", - "_npmVersion": "1.4.22", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - } - ], - "dist": { - "shasum": "07777bea48d78eed75a4258962a09f3dc7b6b916", - "tarball": "http://registry.npmjs.org/npmconf/-/npmconf-1.1.5.tgz" - }, - "_resolved": "https://registry.npmjs.org/npmconf/-/npmconf-1.1.5.tgz" + "_id": "npmconf@1.1.8", + "_shasum": "350e3d7a4da8e4958dfd0391c81e9a750b01cde2", + "_from": "npmconf@^1.1.8" } diff --git a/deps/npm/node_modules/npmconf/test/00-setup.js b/deps/npm/node_modules/npmconf/test/00-setup.js index 27e1069159..d009e81eb6 100644 --- a/deps/npm/node_modules/npmconf/test/00-setup.js +++ b/deps/npm/node_modules/npmconf/test/00-setup.js @@ -15,15 +15,18 @@ process.env.npm_config_userconfig = exports.userconfig process.env.npm_config_other_env_thing = 1000 process.env.random_env_var = 'asdf' process.env.npm_config__underbar_env_thing = 'underful' +process.env.NPM_CONFIG_UPPERCASE_ENV_THING = 42 exports.envData = { userconfig: exports.userconfig, '_underbar-env-thing': 'underful', + 'uppercase-env-thing': '42', 'other-env-thing': '1000' } exports.envDataFix = { userconfig: exports.userconfig, '_underbar-env-thing': 'underful', + 'uppercase-env-thing': 42, 'other-env-thing': 1000, } diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md index 9b9adcc2d1..bdcc8b04db 100644 --- a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/README.md @@ -68,7 +68,7 @@ If the supplied data has an invalid name or version vield, `normalizeData` will * If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`. * If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs. * The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched. -* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`. +* If `description` field does not exist, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`. * If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`. * If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git://github.com/[owner-name]/[repo-name] * If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value. @@ -98,4 +98,4 @@ This package contains code based on read-package-json written by Isaac Z. Schlue ## License normalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). -Copyright (c) 2013 Meryn Stol \ No newline at end of file +Copyright (c) 2013 Meryn Stol diff --git a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json index 2c7e76c19d..084068ead7 100644 --- a/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json +++ b/deps/npm/node_modules/read-package-json/node_modules/normalize-package-data/package.json @@ -1,6 +1,6 @@ { "name": "normalize-package-data", - "version": "1.0.0", + "version": "1.0.1", "author": { "name": "Meryn Stol", "email": "merynstol@gmail.com" @@ -16,13 +16,13 @@ }, "dependencies": { "github-url-from-git": "^1.3.0", - "github-url-from-username-repo": "^0.2.0", + "github-url-from-username-repo": "^1.0.0", "semver": "2 || 3" }, "devDependencies": { "tap": "~0.2.5", "underscore": "~1.4.4", - "async": "~0.2.7" + "async": "~0.9.0" }, "contributors": [ { @@ -38,14 +38,37 @@ "email": "rok@kowalski.gd" } ], - "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)\n\nnormalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.\n\nnormalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\n#### Strict mode\n\nYou may activate strict validation by passing true as the second argument.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, true)\n// packageData is now normalized\n```\n\nIf strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace.\n\n#### Warnings\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nYou may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third.\n\nWhen `private` field is set to `true`, warnings will be suppressed.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed (unless in strict mode).\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `repository.url` is not a valid url, but in the style of \"[owner-name]/[repo-name]\", `repository.url` will be set to git://github.com/[owner-name]/[repo-name]\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.\n* If `homepage` field is not a string, it will be removed.\n* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.\n* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/ . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol ", - "readmeFilename": "README.md", - "gitHead": "976920445743c647bd2c8f579764f2060c649db9", + "gitHead": "d260644f514672cc84f1cc471024679cccc4fd65", "bugs": { "url": "https://github.com/meryn/normalize-package-data/issues" }, "homepage": "https://github.com/meryn/normalize-package-data", - "_id": "normalize-package-data@1.0.0", - "_shasum": "5239d9921791a8ad027607f580a74c76166623c8", - "_from": "normalize-package-data@^1.0.0" + "_id": "normalize-package-data@1.0.1", + "_shasum": "2a4b5200c82cc47bb91c8c9cf47d645499d200bf", + "_from": "normalize-package-data@^1.0.0", + "_npmVersion": "2.0.0-beta.0", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "maintainers": [ + { + "name": "meryn", + "email": "merynstol@gmail.com" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "dist": { + "shasum": "2a4b5200c82cc47bb91c8c9cf47d645499d200bf", + "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-1.0.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-1.0.1.tgz" } diff --git a/deps/npm/node_modules/read-package-json/package.json b/deps/npm/node_modules/read-package-json/package.json index 3247b6b765..8b67330c1d 100644 --- a/deps/npm/node_modules/read-package-json/package.json +++ b/deps/npm/node_modules/read-package-json/package.json @@ -1,6 +1,6 @@ { "name": "read-package-json", - "version": "1.2.6", + "version": "1.2.7", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -17,6 +17,7 @@ }, "dependencies": { "github-url-from-git": "^1.3.0", + "github-url-from-username-repo": "~1.0.0", "glob": "^4.0.2", "lru-cache": "2", "normalize-package-data": "^1.0.0", @@ -29,14 +30,33 @@ "graceful-fs": "2 || 3" }, "license": "ISC", - "readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\n// readJson(filename, [logFunction=noop], [strict=false], cb)\nreadJson('/path/to/package.json', console.error, false, function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n});\n```\n\n## readJson(file, [logFn = noop], [strict = false], cb)\n\n* `file` {String} The path to the package.json file\n* `logFn` {Function} Function to handle logging. Defaults to a noop.\n* `strict` {Boolean} True to enforce SemVer 2.0 version strings, and\n other strict requirements.\n* `cb` {Function} Gets called with `(er, data)`, as is The Node Way.\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of ` : ` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n", - "readmeFilename": "README.md", - "gitHead": "a6390214436eea17043130d7c7d961ae85786e4c", + "gitHead": "41d6696c527e32a1cb38ebf0b6fc91b489b0499c", "bugs": { "url": "https://github.com/isaacs/read-package-json/issues" }, "homepage": "https://github.com/isaacs/read-package-json", - "_id": "read-package-json@1.2.6", - "_shasum": "eedcc11ba25a94f80e5941fdbccff4a21d8ab13a", - "_from": "read-package-json@latest" + "_id": "read-package-json@1.2.7", + "_shasum": "f0b440c461a218f4dbf48b094e80fc65c5248502", + "_from": "read-package-json@^1.2.7", + "_npmVersion": "2.0.0-beta.0", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "dist": { + "shasum": "f0b440c461a218f4dbf48b094e80fc65c5248502", + "tarball": "http://registry.npmjs.org/read-package-json/-/read-package-json-1.2.7.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.2.7.tgz" } diff --git a/deps/npm/node_modules/request/.travis.yml b/deps/npm/node_modules/request/.travis.yml index 0bce81526a..6e4887af80 100644 --- a/deps/npm/node_modules/request/.travis.yml +++ b/deps/npm/node_modules/request/.travis.yml @@ -1,7 +1,7 @@ language: node_js node_js: - - 0.8 - - 0.10 + - "0.8" + - "0.10" env: - OPTIONALS=Y diff --git a/deps/npm/node_modules/request/CHANGELOG.md b/deps/npm/node_modules/request/CHANGELOG.md new file mode 100644 index 0000000000..11f571f23a --- /dev/null +++ b/deps/npm/node_modules/request/CHANGELOG.md @@ -0,0 +1,954 @@ +## Change Log + +### upcoming (2014/07/09 12:10 +00:00) +- [#946](https://github.com/mikeal/request/pull/946) defaults: merge headers (@aj0strow) +- [#844](https://github.com/mikeal/request/pull/844) Add support for HTTP[S]_PROXY environment variables. Fixes #595. (@jvmccarthy) + +### v2.37.1 (2014/07/07 17:25 +00:00) +- [8711b2f](https://github.com/mikeal/request/commit/8711b2f3489553a7ddae69fa8c9f538182c9d5c8) 2.37.1 (@mikeal) + +### v2.37.0 (2014/07/07 17:25 +00:00) +- [79472b2](https://github.com/mikeal/request/commit/79472b263cde77504a354913a16bdc9fbdc9ed5d) append secureOptions to poolKey (@medovob) +- [#907](https://github.com/mikeal/request/pull/907) append secureOptions to poolKey (@medovob) +- [b223a8a](https://github.com/mikeal/request/commit/b223a8add0cbdd4e699a52da66aeb0f0cb17a0c3) expose tough-cookie's getCookiesSync (@charlespwd) +- [f4dcad0](https://github.com/mikeal/request/commit/f4dcad0fa6e2f2388abae508ad7256a1e1214ab2) test getCookies method (@charlespwd) +- [adcf62b](https://github.com/mikeal/request/commit/adcf62bf45ec19a28198ca8d3f37e7d7babc883a) update readme (@charlespwd) +- [4fdf13b](https://github.com/mikeal/request/commit/4fdf13b57dcd20b9fe03c0956f5df70c82d6e4a3) Merge branch 'charlespwd-master' (@lalitkapoor) +- [83e370d](https://github.com/mikeal/request/commit/83e370d54ca2a5fb162e40e7e705e1e9d702ba0a) Bump version of hawk dep. (@samccone) +- [#927](https://github.com/mikeal/request/pull/927) Bump version of hawk dep. (@samccone) +- [c42dcec](https://github.com/mikeal/request/commit/c42dcec10a307cb2299861f87720d491a89142b4) package.json: use OSI-style license name (@isaacs) +- [8892cb7](https://github.com/mikeal/request/commit/8892cb7bb8945807ff25038e888222d4e902acc8) Swap mime module. (@eiriksm) +- [d92395e](https://github.com/mikeal/request/commit/d92395e638cbfe5c31eb4ff54941b98b09057486) Make package.json so node .8 understands it. (@eiriksm) +- [6ebd748](https://github.com/mikeal/request/commit/6ebd748a02a49976d41ebbc4f8396acf8fda1c14) Add some additional hacks to work in the browser. (@eiriksm) +- [#943](https://github.com/mikeal/request/pull/943) New mime module (@eiriksm) +- [561454d](https://github.com/mikeal/request/commit/561454d18a68b7a03163308f6d29e127afe97426) Add some code comments about why we do the extra checks. (@eiriksm) +- [#944](https://github.com/mikeal/request/pull/944) Make request work with browserify (@eiriksm) +- [6a0add7](https://github.com/mikeal/request/commit/6a0add70b2687cf751b3446a15a513a1fd141738) defaults: merge headers (@aj0strow) +- [407c1ad](https://github.com/mikeal/request/commit/407c1ada61afca4d4ba50155c6d9430754541df1) prefer late return statement (@aj0strow) +- [4ab40ba](https://github.com/mikeal/request/commit/4ab40ba2f9aca8958cab149eb9cfbd9edb5534aa) Added support for manual querystring in form option (@charlespwd) +- [a55627c](https://github.com/mikeal/request/commit/a55627cd9f468cefb2971bb501ebc0c2fc27aa8b) Updated README (@charlespwd) +- [#949](https://github.com/mikeal/request/pull/949) Manually enter querystring in form option (@charlespwd) +- [10246c8](https://github.com/mikeal/request/commit/10246c84819db14b32fccca040029b06449242a3) [PATCH v2] Add support for gzip content decoding (@kevinoid) +- [6180c5f](https://github.com/mikeal/request/commit/6180c5f45c01fb2158b9a44f894a34263479fa84) check for content-length header before setting it in nextTick (@camilleanne) +- [#951](https://github.com/mikeal/request/pull/951) Add support for gzip content decoding (@kevinoid) +- [849c681](https://github.com/mikeal/request/commit/849c681846ce3b5492bd47261de391377a3ac19b) Silence EventEmitter memory leak warning #311 (@watson) +- [#955](https://github.com/mikeal/request/pull/955) check for content-length header before setting it in nextTick (@camilleanne) +- [#957](https://github.com/mikeal/request/pull/957) Silence EventEmitter memory leak warning #311 (@watson) +- [c1d951e](https://github.com/mikeal/request/commit/c1d951e536bd41c957f0cade41d051c9d41d1462) Fixing for 0.8 (@mikeal) +- [4851118](https://github.com/mikeal/request/commit/48511186495888a5f0cb15a107325001ac91990e) 2.37.0 (@mikeal) + +### v2.36.1 (2014/05/19 20:59 +00:00) +- [c3914fc](https://github.com/mikeal/request/commit/c3914fcd4a74faf6dbf0fb6a4a188e871e0c51b8) 2.36.1 (@mikeal) + +### v2.36.0 (2014/05/19 20:59 +00:00) +- [76a96de](https://github.com/mikeal/request/commit/76a96de75580042aa780e9587ff7a22522119c3f) Reventing lodash merge change. (@mikeal) +- [b8bb57e](https://github.com/mikeal/request/commit/b8bb57efb17e72e2ac6d957c05c3f2570c7ba6a0) 2.36.0 (@mikeal) + +### v2.35.1 (2014/05/17 20:57 +00:00) +- [4bbd153](https://github.com/mikeal/request/commit/4bbd1532a68cadf1a88dd69c277645e9b781f364) 2.35.1 (@mikeal) + +### v2.35.0 (2014/05/17 20:57 +00:00) +- [2833da3](https://github.com/mikeal/request/commit/2833da3c3c1c34f4130ad1ba470354fc32410691) initial changelog (@lalitkapoor) +- [49319e6](https://github.com/mikeal/request/commit/49319e6c09a8a169c95a8d282c900f9fecd50371) Merge branch 'master' of https://github.com/mikeal/request into create-changelog-based-on-pull-requests (@lalitkapoor) +- [#815](https://github.com/mikeal/request/pull/815) Create changelog based on pull requests (@lalitkapoor) +- [4b6ce1a](https://github.com/mikeal/request/commit/4b6ce1ac0f79cb8fa633e281d3eb4c0cb61794e1) It appears that secureOptions is an undocumented feature to fix issues with broken server. See joynet/node #5119 (@nw) +- [#821](https://github.com/mikeal/request/pull/821) added secureOptions back (@nw) +- [eddd488](https://github.com/mikeal/request/commit/eddd4889fb1bc95c741749e79d9749aab3e103fc) Fixing #825 (@mikeal) +- [4627a7a](https://github.com/mikeal/request/commit/4627a7a14078494ded8c66c19c43efd07324cbd8) improve error reporting for invalid protocols (@FND) +- [#840](https://github.com/mikeal/request/pull/840) improve error reporting for invalid protocols (@FND) +- [#810](https://github.com/mikeal/request/pull/810) add some exposition to mpu example in README.md (@mikermcneil) +- [8a0e2d6](https://github.com/mikeal/request/commit/8a0e2d65351560858275c73505df12b537f4d001) Added support for HTTP_PROXY and HTTPS_PROXY environment variables, if the proxy option isn't already set. (@jvmccarthy) +- [f60d348](https://github.com/mikeal/request/commit/f60d348dc1840ee6d7b709efcc2b3cd1a03aef63) Fix word consistency +- [#850](https://github.com/mikeal/request/pull/850) Fix word consistency in readme (@0xNobody) +- [#809](https://github.com/mikeal/request/pull/809) upgrade tunnel-proxy to 0.4.0 (@ksato9700) +- [e86377c](https://github.com/mikeal/request/commit/e86377c0c1e7695c3997f7802175ca37f5a5113b) Won't use HTTP(S)_PROXY env var if proxy explicitly set to null. (@jvmccarthy) +- [f1bb537](https://github.com/mikeal/request/commit/f1bb537ee2440bd664ea8c445ac3a2c6e31e9932) Add support for RFC 6750 Bearer Tokens +- [ba51a26](https://github.com/mikeal/request/commit/ba51a26079ec52c0a9145fbe8b6796d46e79bb8e) Add documentation about auth.bearer (@phedny) +- [#861](https://github.com/mikeal/request/pull/861) Add support for RFC 6750 Bearer Tokens (@phedny) +- [b8ee579](https://github.com/mikeal/request/commit/b8ee5790ace95440a56074f6afe866f4662e9e88) Fix typo (@dandv) +- [#866](https://github.com/mikeal/request/pull/866) Fix typo (@dandv) +- [b292b59](https://github.com/mikeal/request/commit/b292b59fadecb35dac3bee0959c4b4b782e772e3) Clean code syntax in test-pipes.js (@tgohn) +- [f7996d5](https://github.com/mikeal/request/commit/f7996d5fcfed85e03f293a7c9739e385b64ecaad) Add test for request.pipefilter (@tgohn) +- [#869](https://github.com/mikeal/request/pull/869) Pipefilter test (@tgohn) +- [86b99b6](https://github.com/mikeal/request/commit/86b99b671a3c86f4f963a6c67047343fd8edae8f) Fix typo in form example (@mscdex) +- [2ba4808](https://github.com/mikeal/request/commit/2ba48083ddf2607f85e2c479e0d254483c2610fe) failing test (@lalitkapoor) +- [39396b0](https://github.com/mikeal/request/commit/39396b0bb2e90eb7ec4dfcf5d2e731a2cb156f5c) extend passed in options (@lalitkapoor) +- [#891](https://github.com/mikeal/request/pull/891) fixes 857 - options object is mutated by calling request (@lalitkapoor) +- [54a51c6](https://github.com/mikeal/request/commit/54a51c665887e162ccb9f6b17b9c1f3b017ccc29) merge options (@vohof) +- [25b95db](https://github.com/mikeal/request/commit/25b95dbdddf874f014386a0a9fe35a7c903b7415) tilde? (@vohof) +- [#897](https://github.com/mikeal/request/pull/897) merge with default options (@vohof) +- [a1e4b1a](https://github.com/mikeal/request/commit/a1e4b1a9c2f39ce565fd023bb604da139f689d43) Fixes #555 (@pigulla) +- [#901](https://github.com/mikeal/request/pull/901) Fixes #555 (@pigulla) +- [6498a5f](https://github.com/mikeal/request/commit/6498a5f1ae68050cfeabf8f34f75bc72b08f1805) 2.35.0 (@mikeal) + +### v2.34.1 (2014/02/18 19:35 +00:00) +- [aefea20](https://github.com/mikeal/request/commit/aefea20b215ff1a48f0d8d27dcac0186604e3b2d) 2.34.1 (@mikeal) + +### v2.34.0 (2014/02/18 19:35 +00:00) +- [46edc90](https://github.com/mikeal/request/commit/46edc902e6ffdee39038a6702021728cb9d9b8fa) simpler (@joaojeronimo) +- [#781](https://github.com/mikeal/request/pull/781) simpler isReadStream function (@joaojeronimo) +- [fe2f59f](https://github.com/mikeal/request/commit/fe2f59fdc72de5c86404e51ab6bc4e0e8ece95f2) Provide ability to override content-type when `json` option used (@vvo) +- [#785](https://github.com/mikeal/request/pull/785) Provide ability to override content-type when `json` option used (@vvo) +- [d134f01](https://github.com/mikeal/request/commit/d134f012e64702e8f4070d61504b39524e1a07ba) Adds content-length calculation when submitting forms using form-data library. This is related to issue 345. (@Juul) +- [#793](https://github.com/mikeal/request/pull/793) Adds content-length calculation when submitting forms using form-data li... (@Juul) +- [3ebf25c](https://github.com/mikeal/request/commit/3ebf25c5af1194d8f7b3a3330fe89e729532809b) adding failing test (@lalitkapoor) +- [0f57a90](https://github.com/mikeal/request/commit/0f57a90384588727a5446bb1f5bf4e0be2d85780) accept options in arguments (@lalitkapoor) +- [7fb1647](https://github.com/mikeal/request/commit/7fb164731a5aad80c6539e33eda4ad4a51bb7871) silently ignore errors when adding cookie to jar (@lalitkapoor) +- [d6b2b1c](https://github.com/mikeal/request/commit/d6b2b1c279d12cdddc6593060672d49b12e63fea) add additional header test (@lalitkapoor) +- [f29e6df](https://github.com/mikeal/request/commit/f29e6dfadc6c3a45b6190998b6608059f87f3c32) Added the Apache license to the package.json. (@keskival) +- [#802](https://github.com/mikeal/request/pull/802) Added the Apache license to the package.json. (@keskival) +- [#801](https://github.com/mikeal/request/pull/801) 794 ignore cookie parsing and domain errors (@lalitkapoor) +- [54e6dfb](https://github.com/mikeal/request/commit/54e6dfb77d57757d4006982f813ebaab9e005cd5) Rewrite UNIX Domain Socket support into 2.33.1. Add test. (@lyuzashi) +- [3eaed2f](https://github.com/mikeal/request/commit/3eaed2f2e82d9d17a583bcc54270c16a7b674206) Use setImmediate when available, otherwise fallback to nextTick (@lyuzashi) +- [746ca75](https://github.com/mikeal/request/commit/746ca757da24d5011e92e04cb00c90098a7680fd) Indent wrapped buildRequest function (@lyuzashi) +- [#516](https://github.com/mikeal/request/pull/516) UNIX Socket URL Support (@native-digital) +- [9a5b0a8](https://github.com/mikeal/request/commit/9a5b0a81eca9836f05b0192c05c0d41e79034461) initial format (@lalitkapoor) +- [9380a49](https://github.com/mikeal/request/commit/9380a49779ddb081eba5d0ee51e4396d72d52066) upgrade tunnel-proxy to 0.4.0 (@ksato9700) +- [1efea37](https://github.com/mikeal/request/commit/1efea374286c728c3c988ee2264fb44cd8c41d88) add some exposition to mpu example in README.md (@mikermcneil) +- [ba0d63a](https://github.com/mikeal/request/commit/ba0d63ae23a3fc95dfe012df0bd6c8d7e87b1df7) made the language clearer (@mikermcneil) +- [b43aa81](https://github.com/mikeal/request/commit/b43aa81789c0b8c7ae90d2b983f79dde4a125470) 2.34.0 (@mikeal) + +### v2.33.1 (2014/01/16 19:48 +00:00) +- [afcf827](https://github.com/mikeal/request/commit/afcf827559b3223c96ac1bbd19bd1e4a6d7771e3) 2.33.1 (@mikeal) + +### v2.33.0 (2014/01/16 19:48 +00:00) +- [7f1cc8f](https://github.com/mikeal/request/commit/7f1cc8ff5a8d9443e7a793f4655487e722b75b0d) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [3e43d3d](https://github.com/mikeal/request/commit/3e43d3d5175f5f18d1e97b2f5d4ca6ac6c216e4a) 2.33.0 (@mikeal) + +### v2.32.1 (2014/01/16 19:33 +00:00) +- [dd44f39](https://github.com/mikeal/request/commit/dd44f39d37daacbbeb21f9e960f13adbb44eea0a) 2.32.1 (@mikeal) + +### v2.32.0 (2014/01/16 19:33 +00:00) +- [#757](https://github.com/mikeal/request/pull/757) require aws-sign2 (@mafintosh) +- [#744](https://github.com/mikeal/request/pull/744) Use Cookie.parse (@lalitkapoor) +- [5eaee1c](https://github.com/mikeal/request/commit/5eaee1ce4008ede1df15201622ac478c892d6a8a) Upgrade tough-cookie to 0.10.0 (@stash) +- [#763](https://github.com/mikeal/request/pull/763) Upgrade tough-cookie to 0.10.0 (@stash) +- [d2489d0](https://github.com/mikeal/request/commit/d2489d0e24d9a538224f5c8c090dcdeb1f8d4969) Fixed auth error for some servers like twisted. According to rfc 2617 auth scheme token should be case-insensitive. (@bobyrizov) +- [#764](https://github.com/mikeal/request/pull/764) Case-insensitive authentication scheme (@bobyrizov) +- [cbee3d0](https://github.com/mikeal/request/commit/cbee3d04ee9f704501a64edb7b9b6d201e98494b) Use tough-cookie CookieJar sync API (@stash) +- [3eeaf6a](https://github.com/mikeal/request/commit/3eeaf6a90df7b806d91ae1e8e2f56862ece2ea33) Emit error, not cookieError (@stash) +- [#767](https://github.com/mikeal/request/pull/767) Use tough-cookie CookieJar sync API (@stash) +- [9eac534](https://github.com/mikeal/request/commit/9eac534dd11e40bba65456491cb62ad68d8f41fa) 2.32.0 (@mikeal) + +### v2.31.1 (2014/01/08 02:57 +00:00) +- [b1b5e91](https://github.com/mikeal/request/commit/b1b5e9161e149574ba5528c401a70bfadef1a98a) 2.31.1 (@mikeal) + +### v2.31.0 (2014/01/08 02:57 +00:00) +- [dd2577f](https://github.com/mikeal/request/commit/dd2577f8264d4d4b07484dec7094b72c00c8416f) Removing s3 test. (@mikeal) +- [fef5bf3](https://github.com/mikeal/request/commit/fef5bf34258e3695b61c048c683f1d4a7f99b368) Fix callback arguments documentation (@mmalecki) +- [#736](https://github.com/mikeal/request/pull/736) Fix callback arguments documentation (@mmalecki) +- [5531c20](https://github.com/mikeal/request/commit/5531c208678145ef35b06e948190be2fd6a8a1c8) updating README example: cookie jar api changed cookie module changed to tough-cookie (@emkay) +- [#741](https://github.com/mikeal/request/pull/741) README example is using old cookie jar api (@emkay) +- [9d73e5a](https://github.com/mikeal/request/commit/9d73e5a277af141a6e4fa9dbcae5d0c3b755d277) add note about JSON output body type (@iansltx) +- [#742](https://github.com/mikeal/request/pull/742) Add note about JSON output body type (@iansltx) +- [41e20a4](https://github.com/mikeal/request/commit/41e20a4d288e30101e493b383a0e4852a3271a98) Use Cookie.parse (@lalitkapoor) +- [4d09556](https://github.com/mikeal/request/commit/4d095562a5c42ffb41b0ff194e9e6f32c0f44372) updating setCookie example to make it clear that the callback is required (@emkay) +- [#745](https://github.com/mikeal/request/pull/745) updating setCookie example to make it clear that the callback is required (@emkay) +- [b7ede1d](https://github.com/mikeal/request/commit/b7ede1d56f9a2764e4bf764687b81419df817e5a) README: Markdown code highlight (@weakish) +- [#746](https://github.com/mikeal/request/pull/746) README: Markdown code highlight (@weakish) +- [#645](https://github.com/mikeal/request/pull/645) update twitter api url to v1.1 (@mick) +- [20dcd18](https://github.com/mikeal/request/commit/20dcd18ce8e3397ba7e0213da9c760b048ca5b49) require aws-sign2 (@mafintosh) +- [df2c426](https://github.com/mikeal/request/commit/df2c4264321c3db1387ddf9a945d63b9ae7d57b8) 2.31.0 (@mikeal) + +### v2.30.1 (2013/12/13 19:17 +00:00) +- [eba2d40](https://github.com/mikeal/request/commit/eba2d402fcdcf1ac878de8672b1c9f5da856dcc1) 2.30.1 (@mikeal) + +### v2.30.0 (2013/12/13 19:17 +00:00) +- [aee3819](https://github.com/mikeal/request/commit/aee38191557574ef570fd9c764af0af7072cc92a) Fix TypeError when calling request.cookie +- [#728](https://github.com/mikeal/request/pull/728) Fix TypeError when calling request.cookie (@scarletmeow) +- [628ef76](https://github.com/mikeal/request/commit/628ef768b1f52710b8eb4e14be4db69d174d1dcb) better DIGEST support (@dai-shi) +- [d919bc1](https://github.com/mikeal/request/commit/d919bc1ce97fa461c365437a0c739bbaa6b86de7) ignore null authValues (DIGEST) (@dai-shi) +- [75fc209](https://github.com/mikeal/request/commit/75fc209c5a9e6c647a04e42048c30f46c66fc103) DIGEST support: pass algoritm and opaque, add TODO items, test case for compatible mode (@dai-shi) +- [#730](https://github.com/mikeal/request/pull/730) better HTTP DIGEST support (@dai-shi) +- [937a24a](https://github.com/mikeal/request/commit/937a24a168a126f406ee8eb55eb78169ddc53497) JSHINT: Creating global 'for' variable. Should be 'for (var ...'. +- [#732](https://github.com/mikeal/request/pull/732) JSHINT: Creating global 'for' variable. Should be 'for (var ...'. (@Fritz-Lium) +- [f03be23](https://github.com/mikeal/request/commit/f03be2309bd85a89d2e3c208b2fb4be1a2b95c79) Make digest qop regex more robust (see #730) (@nylen) +- [c7d97ae](https://github.com/mikeal/request/commit/c7d97aefaebf773ce62c72e9ec656f0250b7a1e7) 2.30.0 (@mikeal) + +### v2.29.1 (2013/12/06 20:05 +00:00) +- [e0f2c41](https://github.com/mikeal/request/commit/e0f2c41bd4e15518e97dd2f4c134be51ed4cb68b) 2.29.1 (@mikeal) + +### v2.29.0 (2013/12/06 20:05 +00:00) +- [3c2cad1](https://github.com/mikeal/request/commit/3c2cad11301380f4056eb3ca4c0c124f7f7f72f5) make request.defaults(options, requester) run the requester for all methods (@jchris) +- [#727](https://github.com/mikeal/request/pull/727) fix requester bug (@jchris) +- [0c9f875](https://github.com/mikeal/request/commit/0c9f87542cd1f919751d3ed1f00208ce7705f8e7) 2.29.0 (@mikeal) + +### v2.28.1 (2013/12/04 19:42 +00:00) +- [3e6a300](https://github.com/mikeal/request/commit/3e6a300121586da81b871f759a9feec52810474a) 2.28.1 (@mikeal) + +### v2.28.0 (2013/12/04 19:42 +00:00) +- [ac26f43](https://github.com/mikeal/request/commit/ac26f43d9a8212289f92056d3029c207f755cef4) Update request.js (@wprl) +- [adc2cb6](https://github.com/mikeal/request/commit/adc2cb6721e5980e8ed667a3f558cce8c89ee6c2) Use random cnonce (@wprl) +- [ff16a9d](https://github.com/mikeal/request/commit/ff16a9daf93e01cecee7fabec64c3e1b423f7db5) Add test for random cnonce (@wprl) +- [df64c2b](https://github.com/mikeal/request/commit/df64c2bc8f691ecc6f6c214e2254bab439830b88) Restore whitespace (@wprl) +- [#630](https://github.com/mikeal/request/pull/630) Send random cnonce for HTTP Digest requests (@wprl) +- [aca5a16](https://github.com/mikeal/request/commit/aca5a169c44cc658e8310691a2ae1cfc4c2b0958) update twitter api url to v1.1 (@mick) +- [abcbadd](https://github.com/mikeal/request/commit/abcbadd1b2a113c34a37b62d36ddcfd74452850e) Test case for #304. (@diversario) +- [b8cf874](https://github.com/mikeal/request/commit/b8cf8743b66d8eee4048561a7d81659f053393c8) fix failure when running with NODE_DEBUG=request, and a test for that (@jrgm) +- [e6c7d1f](https://github.com/mikeal/request/commit/e6c7d1f6d23922480c09427d5f54f84eec60b7af) quiet, but check that stderr output has something reasonable for debug (@jrgm) +- [#659](https://github.com/mikeal/request/pull/659) fix failure when running with NODE_DEBUG=request, and a test for that (@jrgm) +- [23164e4](https://github.com/mikeal/request/commit/23164e4f33bd0837d796037c3d0121db23653c34) option.tunnel to explicitly disable tunneling (@seanmonstar) +- [#662](https://github.com/mikeal/request/pull/662) option.tunnel to explicitly disable tunneling (@seanmonstar) +- [#656](https://github.com/mikeal/request/pull/656) Test case for #304. (@diversario) +- [da16120](https://github.com/mikeal/request/commit/da16120a8f0751b305a341c012dbdcfd62e83585) Change `secureOptions' to `secureProtocol' for HTTPS request (@richarddong) +- [43d9d0a](https://github.com/mikeal/request/commit/43d9d0a76974d2c61681ddee04479d514ebfa320) add `ciphers' and `secureProtocol' to `options' in `getAgent' (@richarddong) +- [#666](https://github.com/mikeal/request/pull/666) make `ciphers` and `secureProtocol` to work in https request (@richarddong) +- [524e035](https://github.com/mikeal/request/commit/524e0356b73240409a11989d369511419526b5ed) change cookie module (@sxyizhiren) +- [#674](https://github.com/mikeal/request/pull/674) change cookie module,to tough-cookie.please check it . (@sxyizhiren) +- [e8dbcc8](https://github.com/mikeal/request/commit/e8dbcc83d4eff3c14e03bd754174e2c5d45f2872) tests: Fixed test-timeout.js events unit test (@Turbo87) +- [aed1c71](https://github.com/mikeal/request/commit/aed1c71fac0047b66a236a990a5569445cfe995d) Added Travis CI configuration file (@Turbo87) +- [#683](https://github.com/mikeal/request/pull/683) Travis CI support (@Turbo87) +- [8bfa640](https://github.com/mikeal/request/commit/8bfa6403ce03cbd3f3de6b82388bfcc314e56c61) dependencies: Set `tough-cookie` as optional dependency (@Turbo87) +- [bcc138d](https://github.com/mikeal/request/commit/bcc138da67b7e1cf29dc7d264a73d8b1d1f4b0e4) dependencies: Set `form-data` as optional dependency (@Turbo87) +- [751ac28](https://github.com/mikeal/request/commit/751ac28b7f13bfeff2a0e920ca2926a005dcb6f0) dependencies: Set `tunnel-agent` as optional dependency (@Turbo87) +- [6d7c1c9](https://github.com/mikeal/request/commit/6d7c1c9d8e3a300ff6f2a93e7f3361799acf716b) dependencies: Set `http-signature` as optional dependency (@Turbo87) +- [733f1e3](https://github.com/mikeal/request/commit/733f1e3ae042a513a18cde1c6e444b18ee07ad66) Added .npmignore file (@Turbo87) +- [e2fc346](https://github.com/mikeal/request/commit/e2fc346b7e5e470fcd36189bcadf63c53feebb22) dependencies: Set `hawk` as optional dependency (@Turbo87) +- [e87d45f](https://github.com/mikeal/request/commit/e87d45fe89ea220035bf07696a70292763f7135f) dependencies: Set `aws-sign` as optional dependency (@Turbo87) +- [1cd81ba](https://github.com/mikeal/request/commit/1cd81ba30908b77cff2fa618aeb232fefaa53ada) lib: Added optional() function (@Turbo87) +- [28c2c38](https://github.com/mikeal/request/commit/28c2c3820feab0cc719df213a60838db019f3e1a) dependencies: Set `oauth-sign` as optional dependency (@Turbo87) +- [2ceddf7](https://github.com/mikeal/request/commit/2ceddf7e793feb99c5b6a76998efe238965b22cd) TravisCI: Test with and without optional dependencies (@Turbo87) +- [#682](https://github.com/mikeal/request/pull/682) Optional dependencies (@Turbo87) +- [2afab5b](https://github.com/mikeal/request/commit/2afab5b665a2e03becbc4a42ad481bb737405655) Handle blank password in basic auth. (@diversario) +- [cabe5a6](https://github.com/mikeal/request/commit/cabe5a62dc71282ce8725672184efe9d97ba79a5) Handle `auth.password` and `auth.username`. (@diversario) +- [#690](https://github.com/mikeal/request/pull/690) Handle blank password in basic auth. (@diversario) +- [33100c3](https://github.com/mikeal/request/commit/33100c3c7fa678f592374f7b2526fe9a0499b6f6) Typo (@VRMink) +- [#694](https://github.com/mikeal/request/pull/694) Typo in README (@ExxKA) +- [9072ff1](https://github.com/mikeal/request/commit/9072ff1556bcb002772838a94e1541585ef68f02) Edited README.md for formatting and clarity of phrasing (@Zearin) +- [#696](https://github.com/mikeal/request/pull/696) Edited README.md for formatting and clarity of phrasing (@Zearin) +- [07ee58d](https://github.com/mikeal/request/commit/07ee58d3a8145740ba34cc724f123518e4b3d1c3) Fixing listing in callback part of docs. (@lukasz-zak) +- [#710](https://github.com/mikeal/request/pull/710) Fixing listing in callback part of docs. (@lukasz-zak) +- [8ee21d0](https://github.com/mikeal/request/commit/8ee21d0dcc637090f98251eba22b9f4fd1602f0e) Request.multipart no longer crashes when header 'Content-type' is present (@pastaclub) +- [#715](https://github.com/mikeal/request/pull/715) Request.multipart no longer crashes when header 'Content-type' present (@pastaclub) +- [8b04ca6](https://github.com/mikeal/request/commit/8b04ca6ad8d025c275e40b806a69112ac53bd416) doc: Removed use of gendered pronouns (@oztu) +- [#719](https://github.com/mikeal/request/pull/719) Made a comment gender neutral. (@oztu) +- [8795fc6](https://github.com/mikeal/request/commit/8795fc68cce26b9a45d10db9eaffd4bc943aca3a) README.md: add custom HTTP Headers example. (@tcort) +- [#724](https://github.com/mikeal/request/pull/724) README.md: add custom HTTP Headers example. (@tcort) +- [c5d5b1f](https://github.com/mikeal/request/commit/c5d5b1fcf348e768943fe632a9a313d704d35c65) Changing dep. (@mikeal) +- [bf04163](https://github.com/mikeal/request/commit/bf04163883fa9c62d4e1a9fdd64d6efd7723d5f8) 2.28.0 (@mikeal) + +### v2.27.1 (2013/08/15 21:30 +00:00) +- [a80a026](https://github.com/mikeal/request/commit/a80a026e362a9462d6948adc1b0d2831432147d2) 2.27.1 (@mikeal) + +### v2.27.0 (2013/08/15 21:30 +00:00) +- [3627b9c](https://github.com/mikeal/request/commit/3627b9cc7752cfe57ac609ed613509ff61017045) rename Request and remove .DS_Store (@joaojeronimo) +- [920f9b8](https://github.com/mikeal/request/commit/920f9b88f7dd8f8d153e72371b1bf2d16d5e4160) rename Request (@joaojeronimo) +- [c243cc6](https://github.com/mikeal/request/commit/c243cc66131216bb57bcc0fd79c250a7927ee424) for some reason it removed request.js (@joaojeronimo) +- [#619](https://github.com/mikeal/request/pull/619) decouple things a bit (@CrowdProcess) +- [ed4ecc5](https://github.com/mikeal/request/commit/ed4ecc5ae5cd1d9559a937e84638c9234244878b) Try normal stringify first, then fall back to safe stringify (@mikeal) +- [5642ff5](https://github.com/mikeal/request/commit/5642ff56e64c19e8183dcd5b6f9d07cca295a79e) 2.27.0 (@mikeal) + +### v2.26.1 (2013/08/07 16:31 +00:00) +- [b422510](https://github.com/mikeal/request/commit/b422510ba16315c3e0e1293a17f3a8fa7a653a77) 2.26.1 (@mikeal) + +### v2.26.0 (2013/08/07 16:31 +00:00) +- [3b5b62c](https://github.com/mikeal/request/commit/3b5b62cdd4f3b92e63a65d3a7265f5a85b11c4c9) Only include :password in Basic Auth if it's defined (fixes #602) (@bendrucker) +- [#605](https://github.com/mikeal/request/pull/605) Only include ":" + pass in Basic Auth if it's defined (fixes #602) (@bendrucker) +- [cce2c2c](https://github.com/mikeal/request/commit/cce2c2c8ea5b0136932b2432e4e25c0124d58d5a) Moved init of self.uri.pathname (@lexander) +- [08793ec](https://github.com/mikeal/request/commit/08793ec2f266ef88fbe6c947e6b334e04d4b9dc9) Fix all header casing issues forever. (@mikeal) +- [#613](https://github.com/mikeal/request/pull/613) Fixes #583, moved initialization of self.uri.pathname (@lexander) +- [f98ff99](https://github.com/mikeal/request/commit/f98ff990d294165498c9fbf79b2de12722e5c842) Update this old ass readme with some new HOTNESS! (@mikeal) +- [3312010](https://github.com/mikeal/request/commit/3312010f72d035f22b87a6d8d463f0d91b88fea1) markdown badge instead. (@mikeal) +- [9cf657c](https://github.com/mikeal/request/commit/9cf657c1f08bf460911b8bb0a8c5c0d3ae6135c7) Shorter title. (@mikeal) +- [2c61d66](https://github.com/mikeal/request/commit/2c61d66f1dc323bb612729c7320797b79b22034c) put Request out (@joaojeronimo) +- [28513a1](https://github.com/mikeal/request/commit/28513a1b371452699438c0eb73471f8969146264) 2.26.0 (@mikeal) + +### v2.25.1 (2013/07/23 21:51 +00:00) +- [6387b21](https://github.com/mikeal/request/commit/6387b21a9fb2e16ee4dd2ab73b757eca298587b5) 2.25.1 (@mikeal) + +### v2.25.0 (2013/07/23 21:51 +00:00) +- [828f12a](https://github.com/mikeal/request/commit/828f12a1ae0f187deee4d531b2eaf7531169aaf2) 2.25.0 (@mikeal) + +### v2.24.1 (2013/07/23 20:51 +00:00) +- [29ae1bc](https://github.com/mikeal/request/commit/29ae1bc454c03216beeea69d65b538ce4f61e8c1) 2.24.1 (@mikeal) + +### v2.24.0 (2013/07/23 20:51 +00:00) +- [f667318](https://github.com/mikeal/request/commit/f66731870d5f3e0e5655cd89612049b540c34714) Fixed a small typo (@michalstanko) +- [#601](https://github.com/mikeal/request/pull/601) Fixed a small typo (@michalstanko) +- [#594](https://github.com/mikeal/request/pull/594) Emit complete event when there is no callback (@RomainLK) +- [#596](https://github.com/mikeal/request/pull/596) Global agent is being used when pool is specified (@Cauldrath) +- [41ce492](https://github.com/mikeal/request/commit/41ce4926fb08242f19135fd3ae10b18991bc3ee0) New deps. (@mikeal) +- [8176c94](https://github.com/mikeal/request/commit/8176c94d5d17bd14ef4bfe459fbfe9cee5cbcc6f) 2.24.0 (@mikeal) + +### v2.23.1 (2013/07/23 02:45 +00:00) +- [63f31cb](https://github.com/mikeal/request/commit/63f31cb1d170a4af498fbdd7566f867423caf8e3) 2.23.1 (@mikeal) + +### v2.23.0 (2013/07/23 02:44 +00:00) +- [758f598](https://github.com/mikeal/request/commit/758f598de8d6024db3fa8ee7d0a1fc3e45c50f53) Initial commit. Request package. (@mikeal) +- [104cc94](https://github.com/mikeal/request/commit/104cc94839d4b71aaf3681142daefba7ace78c94) Removing unnecessary markup. (@mikeal) +- [12a4cb8](https://github.com/mikeal/request/commit/12a4cb88b949cb4a81d51189d432c25c08522a87) Matching node documentation style. (@mikeal) +- [ab96993](https://github.com/mikeal/request/commit/ab969931106b10b5f8658dc9e0f512c5dfc2a7da) Release tarball. (@mikeal) +- [e7e37ad](https://github.com/mikeal/request/commit/e7e37ad537081a040ea3e527aac23ae859b40b2c) Removing old tarball. (@mikeal) +- [e66e90d](https://github.com/mikeal/request/commit/e66e90dd814ae7bfbcd52003609d7bde9eafea57) Adding automatic redirect following. (@mikeal) +- [2fc5b84](https://github.com/mikeal/request/commit/2fc5b84832ae42f6ddb081b1909d0a6ca00c8d51) Adding SSL support. (@mikeal) +- [a3ac375](https://github.com/mikeal/request/commit/a3ac375d4b5800a038ae26233425fadc26866fbc) Fixing bug where callback fired for every redirect. (@mikeal) +- [1139efe](https://github.com/mikeal/request/commit/1139efedb5aad4a328c1d8ff45fe77839a69169f) Cleaning up tests. (@mikeal) +- [bb49fe6](https://github.com/mikeal/request/commit/bb49fe6709fa06257f4b7aadc2e450fd45a41328) Rolling version. (@mikeal) +- [4ff3493](https://github.com/mikeal/request/commit/4ff349371931ec837339aa9082c4ac7ddd4c7c35) Updates to README.md (@mikeal) +- [1c9cf71](https://github.com/mikeal/request/commit/1c9cf719c92b02ba85c4e47bd2b92a3303cbe1cf) Adding optional body buffer. (@mikeal) +- [49dfef4](https://github.com/mikeal/request/commit/49dfef42630c4fda6fb208534c00638dc0f06a6b) Rolling version. (@mikeal) +- [ab40cc8](https://github.com/mikeal/request/commit/ab40cc850652e325fcc3b0a44ee7303ae0a7b77f) Preserve the original full path. (@mikeal) +- [6d70f62](https://github.com/mikeal/request/commit/6d70f62c356f18098ca738b3dbedcf212ac3d8d8) Rolling version. (@mikeal) +- [e2ca15a](https://github.com/mikeal/request/commit/e2ca15a0f7e986e3063977ee9bd2eb69e86bdb1f) Fixing bugs and rolling version. (@mikeal) +- [8165254](https://github.com/mikeal/request/commit/81652543d3a09553cbf33095a7932dec53ccecc2) Cleanup. Fixing '' === '/' path bug. (@mikeal) +- [a0536a4](https://github.com/mikeal/request/commit/a0536a46d0b91e204fbde1e4341461bc827c9542) Rolling version. (@mikeal) +- [9ccaad7](https://github.com/mikeal/request/commit/9ccaad7dce05e5dcc3eacaf1500404622a0d8067) Adding stream support for request and response bodies. (@mikeal) +- [585166d](https://github.com/mikeal/request/commit/585166d979d4476e460e9835cc0516d04a9a3e11) Rolling version. (@mikeal) +- [41111c8](https://github.com/mikeal/request/commit/41111c88d711da80ea123df238d62038b89769bf) Bugfix release for response stream. (@mikeal) +- [86e375d](https://github.com/mikeal/request/commit/86e375d093700affe4d6d2b76a7acedbe8da140c) Remove host header when we add it. (@mikeal) +- [3a6277c](https://github.com/mikeal/request/commit/3a6277c81cfd3457c760f2aaea44852ef832a1e8) Rolling version. (@mikeal) +- [7a11f69](https://github.com/mikeal/request/commit/7a11f69d5353ecc1319e2e91ca4aefbaf0338136) writing requestBodyStream into request (@beanieboi) +- [186e9cf](https://github.com/mikeal/request/commit/186e9cf692511d768f8016d311609a0a0a315af6) Using sys.pump (@mikeal) +- [09e7ade](https://github.com/mikeal/request/commit/09e7ade541e1d40316a3f153128871a353e707b1) Fixing host port addition. Rolling version. (@mikeal) +- [cec3f3f](https://github.com/mikeal/request/commit/cec3f3f619322f27e2a82c7fd8971722f98d04d6) Using builtin base64. (@mikeal) +- [2a2e2a2](https://github.com/mikeal/request/commit/2a2e2a2f5c4760d4da3caa1a0f2d14c31a4222dc) new structure. new convenience methods (@mikeal) +- [f835b5f](https://github.com/mikeal/request/commit/f835b5fb605506b8ecd3c17bebe9ed54f0066cfc) removing old files. (@mikeal) +- [91616c4](https://github.com/mikeal/request/commit/91616c4e4f488f75a8b04b5b6f0ceef7e814cffd) Adding better redirect handling. (@mikeal) +- [3a95433](https://github.com/mikeal/request/commit/3a95433cbec9693a16ff365148489a058720ae7c) Fixing tests. (@mikeal) +- [38eb1d2](https://github.com/mikeal/request/commit/38eb1d2fa8dea582bb7c3fb37a7b05ff91857a46) By popular demand, proxy support! Not really tested yet but it seems to kinda work. (@mikeal) +- [45d41df](https://github.com/mikeal/request/commit/45d41dff63f36b25b3403e59c8b172b7aa9ed373) Added proxy auth. (@mikeal) +- [85e3d97](https://github.com/mikeal/request/commit/85e3d97e0dced39a3769c4e3f2707ba3aaab1eaa) Fixing for non-proxy case. (@mikeal) +- [f796da7](https://github.com/mikeal/request/commit/f796da74849d2b0732bd1bae1d2dcaf1243142c1) Fixing relative uri's for forwards. (@mikeal) +- [dead30e](https://github.com/mikeal/request/commit/dead30ebef9c3ff806b895e2bd32f52ba3988c69) Adding support for specifying an encoding for the response body. (@mikeal) +- [9433344](https://github.com/mikeal/request/commit/943334488dcc8e7f90727b86f9eb1bc502c33b4f) Removing debugging statement (@mikeal) +- [41efb7a](https://github.com/mikeal/request/commit/41efb7a7dcca3b47e97c23c6cdbd3e860d3bd82b) Error on maxRedirects exceeded. (@mikeal) +- [9549570](https://github.com/mikeal/request/commit/95495701fa4e99a3ab85acdab71ecdaabe0dbd45) Allow options.url, people do it all the time, might as well just support it. (@mikeal) +- [21a53c0](https://github.com/mikeal/request/commit/21a53c016edcc113e809219639807b46d29dba36) Pumping version. (@mikeal) +- [aca9782](https://github.com/mikeal/request/commit/aca9782285fe1d727570fe8d799561f45d49048e) Fixing byteLength !== string lenght issues. (@mikeal) +- [a77c296](https://github.com/mikeal/request/commit/a77c296431eda2a211f59bdb88654c4a64ed4ef3) Don't rely on automatic semicolon insertion (pretty please :) (@papandreou) +- [8b02f29](https://github.com/mikeal/request/commit/8b02f29c9019dd1d1dd291dd85889b26f592a137) Also set content-length when options.body is the empty string. (@papandreou) +- [023281c](https://github.com/mikeal/request/commit/023281ca9b4414a9bc0170c2b08aaf886a7a08f7) Simplified boolean logic. (@papandreou) +- [4f897fd](https://github.com/mikeal/request/commit/4f897fdd6c7c93bea73dbf34623f09af63bb1ed4) Simplified check for whether response.headers.location starts with "http:" or "https:". (@papandreou) +- [6d7db85](https://github.com/mikeal/request/commit/6d7db85cadf401dffdec07a4d66822207898c69e) Fixed double var declaration. (@papandreou) +- [97255cf](https://github.com/mikeal/request/commit/97255cfd2a4aa8f34d307e7cd96fe1c1f13cb26a) Process redirects as soon as the response arrives. Prevents the uninteresting redirect response from being pumped into responseBodyStream. (@papandreou) +- [b2af15f](https://github.com/mikeal/request/commit/b2af15f4fcbe1115cf8b53c5ae89fbf2365bfffc) New feature: If options.noBuffer is true, don't buffer up the response, just return it. Most of the time getting a readable stream is much more flexible than having the option to pipe the response into a writable stream. For one thing, the stream can be paused. (@papandreou) +- [fee5f89](https://github.com/mikeal/request/commit/fee5f89159a8f36b25df509c55093bf7ebd1c993) A few fixes/changes from papandreou's code, also added new semantics for onResponse. (@mikeal) +- [fa72fcb](https://github.com/mikeal/request/commit/fa72fcb950029b222f0621e2d49304e35d08c380) Updated documentation. (@mikeal) +- [4fc7209](https://github.com/mikeal/request/commit/4fc72098e7eeb9518951b9306115340ffdcce7ce) Fix for both onResponse and callback (@mikeal) +- [3153436](https://github.com/mikeal/request/commit/3153436404fca865a65649d46eb22d9797128c9d) Adding license information. (@mikeal) +- [59570de](https://github.com/mikeal/request/commit/59570dec37913c7e530303a83f03781d9aca958c) Fix for unescaping passwords for basic auth. (@notmatt) +- [0d771ab](https://github.com/mikeal/request/commit/0d771ab7882b97d776179972c51c59386f91b953) require querystring (@notmatt) +- [875f79b](https://github.com/mikeal/request/commit/875f79b6a40340457fafafdadac813cfa5343689) Allow request's body to be an object. (@Stanley) +- [86895b9](https://github.com/mikeal/request/commit/86895b9c37f7b412b7df963c2a75361ff402d8c5) Merge branch 'master' of github.com:Stanley/request (@Stanley) +- [4c9c984](https://github.com/mikeal/request/commit/4c9c984cb37bfd4e901ce24b0e9b283604c27bf4) Better tests. (@mikeal) +- [02f6b38](https://github.com/mikeal/request/commit/02f6b38c1697a55ed43940d1fd0bef6225d4faa2) Added specs for body option (@Stanley) +- [af66607](https://github.com/mikeal/request/commit/af666072a22b8df4d75fe71885139059f56ea5ee) Made specs pass (@Stanley) +- [641ec05](https://github.com/mikeal/request/commit/641ec052dd95797816e781b2c3ac2524841db7cb) Merge branch 'master' of https://github.com/Stanley/request into jsonbody (@mikeal) +- [ab4c96b](https://github.com/mikeal/request/commit/ab4c96be1c002c10806d967a4b266543f8b0267c) Moved spec tests to normal node script tests. Style changes to code and docs. (@mikeal) +- [fc2a7ef](https://github.com/mikeal/request/commit/fc2a7ef301c1266938a5aeb539e4f3fc3b5191dd) Clearer wording for json option. (@mikeal) +- [01371d7](https://github.com/mikeal/request/commit/01371d728082e22aabeb840da82a30aec62d7d8a) Removing specs loader. (@mikeal) +- [560dadd](https://github.com/mikeal/request/commit/560dadd6cbd293622c66cd82b5506704c9850b13) Adding newline to end of test files, makes for cleaner diffs in the future. (@mikeal) +- [a0348dd](https://github.com/mikeal/request/commit/a0348dd0fef462c3c678a639619c27101c757035) Add pass message when tests finish. (@mikeal) +- [da77a0e](https://github.com/mikeal/request/commit/da77a0e152c1dd43f5c1e698110d23e4d32280db) Adding better debug message on failures for GET tests. (@mikeal) +- [6aade82](https://github.com/mikeal/request/commit/6aade822a90724a47176771d137e30b0a702e7ef) throw on error. (@mikeal) +- [4f41b8d](https://github.com/mikeal/request/commit/4f41b8dbbf9a93c53d5ccdf483c9d7803e279916) Rolling version. (@mikeal) +- [7cf01f0](https://github.com/mikeal/request/commit/7cf01f0481afb367b5d0d4878645ac535cfe9a2e) master is moving to node v0.3.6+ (@mikeal) +- [cb403a4](https://github.com/mikeal/request/commit/cb403a4cfdbe3d98feb9151fdbdae1e1436e59ab) Initial support for 0.3.6+.\n\nExperimental support for Request objects as streams. It's untested and requires a pending patch to node.js (@mikeal) +- [a3c80f9](https://github.com/mikeal/request/commit/a3c80f98f42f25d4cb02d5d9e34ba0e67cc89293) Adding defaults call. (@mikeal) +- [55f22f9](https://github.com/mikeal/request/commit/55f22f96365c57aa8687de951e3f9ed982eba408) Request will keep it's own agent pool so that it can expose a maxSockets setting for easy pool sizing. (@mikeal) +- [004741c](https://github.com/mikeal/request/commit/004741c23dc0eaf61f111161bb913ba418e033e4) Fixing reference error. (@mikeal) +- [8548541](https://github.com/mikeal/request/commit/85485414150fbac58b08126b3684f81dcb930bf1) Simplified pool implementation. (@mikeal) +- [9121c47](https://github.com/mikeal/request/commit/9121c47e4cbe47bccc20a75e0e6c6c098dce04fb) Default to globalPool. (@mikeal) +- [9ec3490](https://github.com/mikeal/request/commit/9ec3490aefd52f05b57e6db13730ace54b4439d1) Support for https. Requires pending patch in node core for consistent Agent API. (@mikeal) +- [146b154](https://github.com/mikeal/request/commit/146b154a1a31ae7a30aa9f28e891e4824af548fa) Fixes for reference errors. (@mikeal) +- [8756120](https://github.com/mikeal/request/commit/8756120f83ceb94f8ba600acba274ba512696eef) Only create an agent when a relevant option is passed. (@mikeal) +- [cc3cf03](https://github.com/mikeal/request/commit/cc3cf0322847982875ff32a7cef25c39c29630ba) New HTTP client doesn't require such explicit error listener management. (@mikeal) +- [f7c0379](https://github.com/mikeal/request/commit/f7c0379b99ac7989df7f934be67cc3ae979591bb) Fixing bug in .pipe() handling. Thanks tanepiper. (@mikeal) +- [897a7ef](https://github.com/mikeal/request/commit/897a7ef020cefcb7a36c04a11e286238df8ecdaa) Fixes for streams, docs, and convenience methods. (@mikeal) +- [7c2899a](https://github.com/mikeal/request/commit/7c2899a046b750eda495b23b2d58604260deddbc) Doc fixes. (@mikeal) +- [f535fe1](https://github.com/mikeal/request/commit/f535fe1008c8f11bb37e16f95fe287ed93343704) Doc fixes. (@mikeal) +- [d1deb5b](https://github.com/mikeal/request/commit/d1deb5b4dda4474fe9d480ad42ace664d89e73ee) Pipe tests, all passing! (@mikeal) +- [d67a041](https://github.com/mikeal/request/commit/d67a041783df8d724662d82f9fb792db1be3f4f0) Moving basic example to the top. (@mikeal) +- [6a98b9e](https://github.com/mikeal/request/commit/6a98b9e4a561b516b14d325c48785a9d6f40c514) Do not mix encoding option with pipeing. (@mikeal) +- [06b67ef](https://github.com/mikeal/request/commit/06b67ef01f73572a6a9b586854d4c21be427bdb2) Disable pooling with {pool:false} (@mikeal) +- [1c24881](https://github.com/mikeal/request/commit/1c248815b5dfffda43541e367bd4d66955ca0325) Send all arguments passed to stream methods. (@mikeal) +- [7946393](https://github.com/mikeal/request/commit/7946393893e75df24b390b7ab19eb5b9d6c23891) Better errors and warnings for different pipe conditions. (@mikeal) +- [ee2108d](https://github.com/mikeal/request/commit/ee2108db592113a0fe3840c361277fdd89f0c89c) Removing commented out legacy code. (@mikeal) +- [5f838b3](https://github.com/mikeal/request/commit/5f838b3582eda465f366d7df89c6dd69920405f2) Fixing redirect issue, thanks @linus (@mikeal) +- [c08758e](https://github.com/mikeal/request/commit/c08758e25290ee12278b3eb95d502645e0d66e4e) Adding del alias, thanks tanepiper. (@mikeal) +- [0b7d675](https://github.com/mikeal/request/commit/0b7d6756c120ebf17ce6c70fc1ff4ecd6850e704) Keep require('https') from throwing if node is compiled with --without-ssl. This will still throw for Invalid Protocol if https is used. Which makes more sense and makes request work without SSl support. (@davglass) +- [02fc9f7](https://github.com/mikeal/request/commit/02fc9f7cc8912402a5a98ddefaffa5f6da870562) Rolling version. Pushed new version to npm. (@mikeal) +- [0b30532](https://github.com/mikeal/request/commit/0b30532ee1a3cabb177017acfa7885b157031df2) Sent a patch today to fix this in core but this hack will fix node that predates that fix to core. (@mikeal) +- [5d5d8f4](https://github.com/mikeal/request/commit/5d5d8f43156b04fd3ceb312cfdf47cc2b0c4104d) Rolling version. Pushed new version to npm. (@mikeal) +- [1c00080](https://github.com/mikeal/request/commit/1c000809f1795d2e21635a626cf730aba2049d3e) Fixing reference to tls. (@mikeal) +- [4c355d1](https://github.com/mikeal/request/commit/4c355d1f87fced167e4b21770bfe6f8208f32b53) Be a better stream. (@mikeal) +- [9bed22f](https://github.com/mikeal/request/commit/9bed22f22e007201d4faeebdb486603c3bb088c3) Rolled version and pushed to npm (@mikeal) +- [34df8e2](https://github.com/mikeal/request/commit/34df8e2301dcfd10705b9ff3b257741b0816c8a1) typo in `request.defaults` (@clement) +- [4d7a6d4](https://github.com/mikeal/request/commit/4d7a6d46fa481e43fe873b8c8fad2f7dd816dbb5) default value only if undefined in `request.defaults` + misplaced `return` statement (@clement) +- [243a565](https://github.com/mikeal/request/commit/243a56563f1014318a467e46113b2c61b485f377) Adding support for request(url) (@mikeal) +- [83a9cec](https://github.com/mikeal/request/commit/83a9cec3cb2f7a43a1e10c13da8d0dd72b937965) Fixing case where + is in user or password. (@mikeal) +- [8bb7f98](https://github.com/mikeal/request/commit/8bb7f98ba8b78c217552c979811c07f1299318fe) making Request a duplex stream rather than adding special handling for pipes out. (@mikeal) +- [55a1fde](https://github.com/mikeal/request/commit/55a1fdedcad1e291502ce10010dda7e478a1b503) pause and resume should act on response instead of request (@tobowers) +- [63125a3](https://github.com/mikeal/request/commit/63125a33523e72e449ceef76da57b63522998282) Making request really smart about pipeing to itself so that we can do simple proxy cats (@mikeal) +- [2f9e257](https://github.com/mikeal/request/commit/2f9e257bc39eb329eec660c6d675fb40172fc5a5) Rolling version since master right now has some pretty hot new code in it. (@mikeal) +- [#31](https://github.com/mikeal/request/pull/31) Error on piping a request to a destination (@tobowers) +- [b1f3d54](https://github.com/mikeal/request/commit/b1f3d5439d24b848b2bf3a6459eea74cb0e43df3) The "end" event that was supposed to be emitted to fix a core bug in NodeJS wasn't fired because it wasn't emitted on the response object. (@voxpelli) +- [#35](https://github.com/mikeal/request/pull/35) The "end" event isn't emitted for some responses (@voxpelli) +- [40b1c67](https://github.com/mikeal/request/commit/40b1c676e1d3a292719ad2dd9cf9354c101bad47) Rolling version. (@mikeal) +- [9a28022](https://github.com/mikeal/request/commit/9a28022d0e438d0028e61a53e897689470025e50) Fixing bug in forwarding with new pipes logic. (@mikeal) +- [44e4e56](https://github.com/mikeal/request/commit/44e4e5605b0a9e02036393bcbd3a8d91280f5611) Fixing big bug in forwarding logic. (@mikeal) +- [b0cff72](https://github.com/mikeal/request/commit/b0cff72d63689d96e0b1d49a8a5aef9ccc71cb8b) Added timeout option to abort the request before the response starts responding (@mbrevoort) +- [cc76b10](https://github.com/mikeal/request/commit/cc76b109590437bfae54116e3424b2c6e44a3b3e) corrected spelling error in README (@mbrevoort) +- [#45](https://github.com/mikeal/request/pull/45) Added timeout option (@mbrevoort) +- [1cca56b](https://github.com/mikeal/request/commit/1cca56b29bb670c53d5995e76c0b075a747b5ad7) Fixing for node http client refactor. (@mikeal) +- [2a78aa3](https://github.com/mikeal/request/commit/2a78aa3f827e76c548e001fa519448b24466b518) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [ce12273](https://github.com/mikeal/request/commit/ce12273d3990c1446d3166bbd9e35c0e2435f137) New fs.ReadStream handling hotness. (@mikeal) +- [535e30a](https://github.com/mikeal/request/commit/535e30a4bd4a8e41d97ffa6a4e99630ac09a4bcb) Adding pipe support to HTTP ServerResponse objects. (@mikeal) +- [2f0cf6b](https://github.com/mikeal/request/commit/2f0cf6bf44edbaec4c0a0cb15a679302de7f0aff) Setting proper statusCode. (@mikeal) +- [6e3ecb1](https://github.com/mikeal/request/commit/6e3ecb106c3a32101d80ac0f87968fddd3ac5e2c) Adding test for pipeing file to disc. (@mikeal) +- [bbbb52e](https://github.com/mikeal/request/commit/bbbb52e406b65100b557caa3687a1aa04fab6ff3) Pumping version. (@mikeal) +- [a10b6e4](https://github.com/mikeal/request/commit/a10b6e4c08478364b8079801fdb23f3530fcc85f) Adding reference to Request instance on response to make it easier on inline callbacks. fixes #43. (@mikeal) +- [b9aff1f](https://github.com/mikeal/request/commit/b9aff1fe007dab3f93e666f047fa03a4e8f5f8b7) Add body property to resp when we have it as a shorthand. fixes #28 (@mikeal) +- [411b30d](https://github.com/mikeal/request/commit/411b30dab1fe5b20880113aa801a2fdbb7c35c40) If the error is handled and not throw we would still process redirects. Fixes #34. (@mikeal) +- [8f3c2b4](https://github.com/mikeal/request/commit/8f3c2b4f6dee8838f30e2430a23d5071128148f0) w00t! request 2.0 (@mikeal) +- [9957542](https://github.com/mikeal/request/commit/9957542cc6928443f3a7769510673665b5a90040) valid semver. (@mikeal) +- [31f5ee2](https://github.com/mikeal/request/commit/31f5ee28726ac7e14355cad0c6d2785f9ca422c6) Drastically improved header handling. (@mikeal) +- [c99b8fc](https://github.com/mikeal/request/commit/c99b8fcd706ae035f6248669b017ac2995e45f31) Return destination stream from pipe(). (@mikeal) +- [cba588c](https://github.com/mikeal/request/commit/cba588cec1e204d70f40f8bd11df0e27dc78ef0c) Style fixes. Bye Bye semi-colons. Mostly lined up with npm style. (@mikeal) +- [8515a51](https://github.com/mikeal/request/commit/8515a510ccc0a661d7c28fce6e513a7d71be7f8f) Clearer spacing. Slightly more consistent. (@mikeal) +- [3acd82a](https://github.com/mikeal/request/commit/3acd82a10e7d973fc5dbaa574c2e8906e48e1ee9) add failing test for issue #51 (@benatkin) +- [68c17f6](https://github.com/mikeal/request/commit/68c17f6c9a3d7217368b3b8bc61203e6a14eb4f0) implement parsing json response when json is truthy (@benatkin) +- [1cb1ec1](https://github.com/mikeal/request/commit/1cb1ec114b03394a0a530f245a857d8424cad02d) allow empty string (@benatkin) +- [4f8d2df](https://github.com/mikeal/request/commit/4f8d2df9f845690667a56e7698dbaf23b5028177) support JSON APIs that don't set the write content type (@benatkin) +- [#53](https://github.com/mikeal/request/pull/53) Parse json: Issue #51 (@benatkin) +- [c63e6e9](https://github.com/mikeal/request/commit/c63e6e96378a2b050bddbe1b39337662f304dc95) Adding proxy to docs, don't know why this wasn't already in. (@mikeal) +- [ef767d1](https://github.com/mikeal/request/commit/ef767d12f13a9c78d3df89add7556f5421204843) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [1b12d3a](https://github.com/mikeal/request/commit/1b12d3a9f48a6142d75fa1790c80eb313388ca44) Emit a proper error. (@mikeal) +- [47314d7](https://github.com/mikeal/request/commit/47314d7cb41fe9c3a7717a502bed9cf1b6074ffc) Greatly expanded documentation. (@mikeal) +- [e477369](https://github.com/mikeal/request/commit/e477369b4bbc271248ee8b686c556567570a6cca) Doc refinements. (@mikeal) +- [fe4d221](https://github.com/mikeal/request/commit/fe4d22109bc1411c29b253756d609856327ff146) Fix for newer npm (@mikeal) +- [7b2f788](https://github.com/mikeal/request/commit/7b2f788293e205edc7b46a7fd5304296b5e800e3) More doc cleanup. (@mikeal) +- [f8eb2e2](https://github.com/mikeal/request/commit/f8eb2e229aca38547236d48066a0b3f9f8f67638) Copy headers so that they survive mutation. (@mikeal) +- [59eab0e](https://github.com/mikeal/request/commit/59eab0e5e49c6d32697822f712ed725843e70010) Rolling version. (@mikeal) +- [76bf5f6](https://github.com/mikeal/request/commit/76bf5f6c6e37f6cb972b3d4f1ac495a4ceaaa00d) Improvements to json handling and defaults. (@mikeal) +- [81e2c40](https://github.com/mikeal/request/commit/81e2c4040a9911a242148e1d4a482ac6c745d8eb) Rolling version. (@mikeal) +- [76d8924](https://github.com/mikeal/request/commit/76d8924cab295f80518a71d5903f1e815618414f) Proper checking and handling of json bodies (@mikeal) +- [a8422a8](https://github.com/mikeal/request/commit/a8422a80895ed70e3871c7826a51933a75c51b69) Rolling version. (@mikeal) +- [f236376](https://github.com/mikeal/request/commit/f2363760782c3d532900a86d383c34f3c94f6d5f) Adding pipefilter. (@mikeal) +- [dd85f8d](https://github.com/mikeal/request/commit/dd85f8da969c2cc1825a7dfec6eac430de36440c) Rolling version. (@mikeal) +- [#66](https://github.com/mikeal/request/pull/66) Do not overwrite established content-type headers for read stream deliver (@voodootikigod) +- [b09212f](https://github.com/mikeal/request/commit/b09212f38fe736c2c92a1ee076cae9d0f4c612c3) Do not overwrite established content-type headers for read stream deliveries. (@voodootikigod) +- [01bc25d](https://github.com/mikeal/request/commit/01bc25d25343d73e9f5731b3d0df1cf5923398d4) Only apply workaround on pre-0.5 node.js and move test to assert.equal (@mikeal) +- [d487131](https://github.com/mikeal/request/commit/d487131ebc2f7a4bf265061845f7f3ea2fd3ed34) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [1200df5](https://github.com/mikeal/request/commit/1200df52bd334f9a44a43846159146b8f938fd9e) Rolling version. (@mikeal) +- [8279362](https://github.com/mikeal/request/commit/82793626f6965884a3720d66f5a276d7d4d30873) fix global var leaks (@aheckmann) +- [#67](https://github.com/mikeal/request/pull/67) fixed global variable leaks (@aheckmann) +- [ab91204](https://github.com/mikeal/request/commit/ab9120495a89536c7152e3cdf17d684323b40474) Test that chunked responses are properly toString'ed (@isaacs) +- [9bff39f](https://github.com/mikeal/request/commit/9bff39fa485f28d7f1754e72f026418ca1186783) Properly flatten chunked responses (@isaacs) +- [8e4e956](https://github.com/mikeal/request/commit/8e4e95654391c71c22933ffd422fdc82d20ac059) Fix #52 Make the tests runnable with npm (@isaacs) +- [a9aa9d6](https://github.com/mikeal/request/commit/a9aa9d6d50ef0481553da3e50e40e723a58de10a) Fix #71 Respect the strictSSL flag (@isaacs) +- [#69](https://github.com/mikeal/request/pull/69) Flatten chunked requests properly (@isaacs) +- [#73](https://github.com/mikeal/request/pull/73) Fix #71 Respect the strictSSL flag (@isaacs) +- [#70](https://github.com/mikeal/request/pull/70) add test script to package.json (@isaacs) +- [08ca561](https://github.com/mikeal/request/commit/08ca5617e0d8bcadee98f10f94a49cbf2dd02862) Fixing case where encoding is set. Also cleaning up trailing whitespace because my editor likes to do that now. (@mikeal) +- [0be269f](https://github.com/mikeal/request/commit/0be269f7d9da6c3a14a59d5579546fee9d038960) Fixing case where no body exists. (@mikeal) +- [2f37bbc](https://github.com/mikeal/request/commit/2f37bbc51ff84c3c28ae419138a19bd33a9f0103) Fixing timeout tests. (@mikeal) +- [f551a2f](https://github.com/mikeal/request/commit/f551a2f02a87994249c2fd37dc8f20a29e8bf529) Fixing legacy naming of self as options. (@mikeal) +- [717789e](https://github.com/mikeal/request/commit/717789ec9f690e9d5216ce1c27688eef822940cc) Avoid duplicate emit when using a timeout (@Marsup) +- [#76](https://github.com/mikeal/request/pull/76) Bug when a request fails and a timeout is set (@Marsup) +- [c1d255e](https://github.com/mikeal/request/commit/c1d255e5bcc5791ab69809913fe6d917ab93c8b7) global leakage in request.defaults (@isaacs) +- [14070f2](https://github.com/mikeal/request/commit/14070f269c79cae6ef9e7f7a415867150599bb8e) Don't require SSL for non-SSL requests (@isaacs) +- [4b8f696](https://github.com/mikeal/request/commit/4b8f6965e14c6fb704cf16f5bc011e4787cf32b2) Set proxy auth instead of just setting auth a second time (@isaacs) +- [cd22fbd](https://github.com/mikeal/request/commit/cd22fbdb00b90c5c75187ecf41373cfbb4af5bcd) Merge branch 'proxy-auth-bug' (@isaacs) +- [#78](https://github.com/mikeal/request/pull/78) Don't try to do strictSSL for non-ssl connections (@isaacs) +- [d8c53fc](https://github.com/mikeal/request/commit/d8c53fceca3af385753880395c680f6ec3d4d560) Removing legacy call to sys.puts (@mikeal) +- [731b32b](https://github.com/mikeal/request/commit/731b32b654bb217de3466b8d149ce480988bb24b) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [9c897df](https://github.com/mikeal/request/commit/9c897dffc7e238f10eb7e14c61978d6821c70f56) Enhance redirect handling: (1) response._redirectsFollowed reports the total number of redirects followed instead of being reset to 0; (2) add response.redirects, an array of the response.statusCode and response.headers.location for each redirect. (@danmactough) +- [#81](https://github.com/mikeal/request/pull/81) Enhance redirect handling (@danmactough) +- [4c84001](https://github.com/mikeal/request/commit/4c8400103ec18a0729e29e9ffb17dda65ce02f6d) Document strictSSL option (@isaacs) +- [d517ac0](https://github.com/mikeal/request/commit/d517ac03278b3ebd9a46ca9f263bea68d655822b) allow passing in buffers as multipart bodies (@kkaefer) +- [6563865](https://github.com/mikeal/request/commit/6563865b80573ad3c68834a6633aff6d322b59d5) bugs[web] should be bugs[url] (@isaacs) +- [2625854](https://github.com/mikeal/request/commit/262585480c148c56772dfc8386cfc59d5d262ca0) add option followAllRedirects to follow post/put redirects +- [bc057af](https://github.com/mikeal/request/commit/bc057affb58272d9152766956e5cde4ea51ca043) fix typo, force redirects to always use GET +- [d68b434](https://github.com/mikeal/request/commit/d68b434693dbf848dff4c570c4249a35329cc24f) Support node 0.5.11-style url parsing (@isaacs) +- [#96](https://github.com/mikeal/request/pull/96) Authless parsed url host support (@isaacs) +- [9f66c6d](https://github.com/mikeal/request/commit/9f66c6d79bc6515d870b906df39bd9d6d9164994) Typo, causing 'TypeError: Cannot read property 'length' of undefined' (@isaacs) +- [#97](https://github.com/mikeal/request/pull/97) Typo in previous pull causes TypeError in non-0.5.11 versions (@isaacs) +- [b320e05](https://github.com/mikeal/request/commit/b320e05f2d84510f47a6b6857d091c8cd4d3ae2e) When no request body is being sent set 'content-length':0. fixes #89 (@mikeal) +- [059916c](https://github.com/mikeal/request/commit/059916c545a0faa953cb8ac66b8c3ae243b1c8ce) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [248e9d6](https://github.com/mikeal/request/commit/248e9d65e73ac868948a82d07feaf33387723a1d) Fix for pipe() after response. Added response event, fixed and updated tests, removed deprecated stream objects. (@mikeal) +- [a2e5d6e](https://github.com/mikeal/request/commit/a2e5d6e30d3e101f8c5a034ef0401fdde8608ccf) Fixing double callback firing. node 0.5 is much better about calling errors on the client object which, when aborting on timeout, predictable emits an error which then triggers a double callback. (@mikeal) +- [5f80577](https://github.com/mikeal/request/commit/5f805775e6aeaaf229cc781439b29108fb69f373) Release for 0.6 (@mikeal) +- [bf906de](https://github.com/mikeal/request/commit/bf906de601121b52c433b0af208550f1db892cde) Adding some oauth support, tested with Twitter. (@mikeal) +- [8869b2e](https://github.com/mikeal/request/commit/8869b2e88cc305e224556c5ca75b7b59311911d9) Removing irrelevant comments. (@mikeal) +- [8323eed](https://github.com/mikeal/request/commit/8323eed4915bb73b33544bc276f3840c13969134) Closed issue 82 : handling cookies - added tests too +- [739f841](https://github.com/mikeal/request/commit/739f84166d619778ab96fd0b0f4f1f43e8b0fdda) Closed issue 82 : handling cookies - added tests too +- [7daf841](https://github.com/mikeal/request/commit/7daf8415fb1a4e707ec54eb413169e49d8bbe521) Closed issue 82 : handling cookies - added tests too +- [6c22041](https://github.com/mikeal/request/commit/6c22041a4719bf081c827dda8f35e7b79b4c39d9) changed README +- [3db7f7d](https://github.com/mikeal/request/commit/3db7f7d38e95406b84f06fed52b69038b0250904) Updated README +- [6181b7a](https://github.com/mikeal/request/commit/6181b7a8a4be75bcf75cd3ff6dacb8e910737e92) Documented request.cookie() and request.jar() +- [fc44260](https://github.com/mikeal/request/commit/fc44260d13f0094bfe96d18878a11c6fe88b69e5) Tiny cookie example error on README +- [366831b](https://github.com/mikeal/request/commit/366831b705b5d5ebfbec5f63b4b140cbafcb4515) Remove instanceof check for CookieJar (mikeal suggestion) +- [88488cf](https://github.com/mikeal/request/commit/88488cf076efbd916b0326e0981e280c993963a7) Also add cookie to the user defined cookie jar (mikeal's suggestion) +- [f6fef5b](https://github.com/mikeal/request/commit/f6fef5bfa4ba8e1dfa3022df8991716e5cba7264) Updated cookie documentation in README file +- [b519044](https://github.com/mikeal/request/commit/b5190441a889164dfeb4148fac643fd7a87cfb51) request.defaults({jar: false}) disables cookies && also updated README +- [856a65c](https://github.com/mikeal/request/commit/856a65cd28402efbe3831a68d73937564a27ea9b) Update jar documentation in the options also +- [#102](https://github.com/mikeal/request/pull/102) Implemented cookies - closes issue 82: https://github.com/mikeal/request/issues/82 (@alessioalex) +- [62592e7](https://github.com/mikeal/request/commit/62592e7fe9ee5ecaee80b8f5bc2400e4a277e694) Cookie bugs (@janjongboom) +- [a06ad2f](https://github.com/mikeal/request/commit/a06ad2f955270974409e75c088e1f5d1f5298ff5) Follow redirects should work on PUT and POST requests as well. This is more consistent to other frameworks, e.g. .NET (@janjongboom) +- [bf3f5d3](https://github.com/mikeal/request/commit/bf3f5d30fdabf6946096623fc3398bb66ed19a1f) Cookies shouldn't be discarded when followRedirect = true (@janjongboom) +- [16db85c](https://github.com/mikeal/request/commit/16db85c07e6c2516269299640fdddca6db7bc051) Revert "Follow redirects should work on PUT and POST requests as well. This is more consistent to other frameworks, e.g. .NET" (@janjongboom) +- [841664e](https://github.com/mikeal/request/commit/841664e309f329be98c1a011c634f5291af1eebc) Add test for proxy option (@dominictarr) +- [#105](https://github.com/mikeal/request/pull/105) added test for proxy option. (@dominictarr) +- [50d2d39](https://github.com/mikeal/request/commit/50d2d3934cd86d7142a4aab66017bb1ef82329cf) Fixing test, emitter matches on req.url so it needs the full url. (@mikeal) +- [668a291](https://github.com/mikeal/request/commit/668a291013380af305eba12b1d5c7a5376a74c76) Adding some documentation for OAuth signing support. (@mikeal) +- [04faa3b](https://github.com/mikeal/request/commit/04faa3bf2b1f4ec710414c6ec7231b24767b2f89) Minor improvements in example (@mikeal) +- [0fddc17](https://github.com/mikeal/request/commit/0fddc1798dcd9b213e3f8aec504c61cecf4d7997) Another small fix to the url in the docs. (@mikeal) +- [337649a](https://github.com/mikeal/request/commit/337649a08b4263c0d108cd4621475c8ff9cf8dd0) Add oauth to options. (@mikeal) +- [#86](https://github.com/mikeal/request/pull/86) Can't post binary to multipart requests (@developmentseed) +- [4e4d428](https://github.com/mikeal/request/commit/4e4d4285490be20abf89ff1fb54fb5088c01c00e) Update to Iris Couch URL (@jhs) +- [#110](https://github.com/mikeal/request/pull/110) Update to Iris Couch URL (@iriscouch) +- [d7af099](https://github.com/mikeal/request/commit/d7af0994b382466367f2cafc5376150e661eeb9d) Remove the global `i` as it's causing my test suites to fail with leak detection turned on. (@3rd-Eden) +- [#117](https://github.com/mikeal/request/pull/117) Remove the global `i` (@3rd-Eden) +- [b2a4ad1](https://github.com/mikeal/request/commit/b2a4ad1e7d7553230e932ea093d7f77f38147ef9) Force all cookie keys into lower case as suggested by LinusU (@jhurliman) +- [055a726](https://github.com/mikeal/request/commit/055a7268b40425643d23bd6a4f09c7268dbab680) Applying a modified version of pull request #106 as suggested by janjongboom (@jhurliman) +- [#121](https://github.com/mikeal/request/pull/121) Another patch for cookie handling regression (@jhurliman) +- [a353f4e](https://github.com/mikeal/request/commit/a353f4eeb312ea378d34b624f5c4df33eefa152c) Merge remote-tracking branch 'upstream/master' (@janjongboom) +- [#104](https://github.com/mikeal/request/pull/104) Cookie handling contains bugs (@janjongboom) +- [a3be5ad](https://github.com/mikeal/request/commit/a3be5ad5ea112422ed00da632530b93bcf54727c) Fix encoding of characters like ( (@mikeal) +- [dd2067b](https://github.com/mikeal/request/commit/dd2067bbbf77d1132c9ed480848645136b8a5521) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [ddc4e45](https://github.com/mikeal/request/commit/ddc4e453c3b9a0e11da4df156c5e15206abfc1ef) Pushed new version to npm (@mikeal) +- [feee5eb](https://github.com/mikeal/request/commit/feee5ebd2ca8c09db25b5cb13cd951f7c4322a49) Real fix for encoding issues in javascript and oauth. (@mikeal) +- [23896cd](https://github.com/mikeal/request/commit/23896cdc66d75ec176876167ff21da72b7ff181b) Pushed new version to npm. (@mikeal) +- [a471ed2](https://github.com/mikeal/request/commit/a471ed2ca8acdca1010a0fc20434c5c9956b0d0c) HTTP redirect tests (@jhs) +- [a4a9aa1](https://github.com/mikeal/request/commit/a4a9aa199ff958630791e131092ec332ada00a49) A self-signed certificate for upcoming HTTPS testing (@jhs) +- [10ac6b9](https://github.com/mikeal/request/commit/10ac6b9db40263bec1bf63ee7e057000ffd2d7e9) HTTPS tests, for now a copy of the test-body tests (@jhs) +- [105aed1](https://github.com/mikeal/request/commit/105aed1ff99add1957f91df7efabf406e262f463) Support an "httpModules" object for custom http/https module behavior (@jhs) +- [#112](https://github.com/mikeal/request/pull/112) Support using a custom http-like module (@iriscouch) +- [d05a875](https://github.com/mikeal/request/commit/d05a8753af576fc1adccc7ffe9633690371c05ee) Test for #129 (@mikeal) +- [06cdfaa](https://github.com/mikeal/request/commit/06cdfaa3c29233dac3f47e156f2b5b3a0f0ae4b8) return body as buffer when encoding is null +- [#132](https://github.com/mikeal/request/pull/132) return the body as a Buffer when encoding is set to null (@jahewson) +- [4882e51](https://github.com/mikeal/request/commit/4882e519ed6b8d08795da5de37166148ce0ee440) fixed cookies parsing, updated tests (@afanasy) +- [2be228e](https://github.com/mikeal/request/commit/2be228ec8b48a60028bd1d80c8cbebf23964f913) Change `host` to `hostname` in request hash +- [#135](https://github.com/mikeal/request/pull/135) host vs hostname (@iangreenleaf) +- [e24abc5](https://github.com/mikeal/request/commit/e24abc5cc2c6fa154ae04fe58a16d135eeba4951) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [c99c809](https://github.com/mikeal/request/commit/c99c809bb48b9c0193aae3789c5c844f7f6cbe92) Reverting host -> hostname because it breaks in pre-0.6. (@mikeal) +- [a1134d8](https://github.com/mikeal/request/commit/a1134d855f928fde5c4fe9ee255c111da0195bfc) adding logging (@mikeal) +- [#133](https://github.com/mikeal/request/pull/133) Fixed cookies parsing (@afanasy) +- [9179471](https://github.com/mikeal/request/commit/9179471f9f63b6ba9c9078a35cb888337ce295e8) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [cbb180b](https://github.com/mikeal/request/commit/cbb180b0399074995c235a555e3e3e162d738f7c) Fixes to oauth test. (@mikeal) +- [e1c351f](https://github.com/mikeal/request/commit/e1c351f92958634ccf3fbe78aa2f5b06d9c9a5fa) Published new version. (@mikeal) +- [3ceee86](https://github.com/mikeal/request/commit/3ceee86f1f3aad3a6877d6d3813e087549f3b485) Formatting fixes. (@mikeal) +- [18e1af5](https://github.com/mikeal/request/commit/18e1af5e38168dcb95c8ae29bb234f1ad9bbbdf9) Fixing log error. (@mikeal) +- [edc19b5](https://github.com/mikeal/request/commit/edc19b5249f655714efa0f8fa110cf663b742921) Pushed new version. (@mikeal) +- [f51c32b](https://github.com/mikeal/request/commit/f51c32bd6f4da0419ed8404b610c43ee3f21cf92) added "form" option to readme. (@petejkim) +- [#144](https://github.com/mikeal/request/pull/144) added "form" option to readme (@petejkim) +- [b58022e](https://github.com/mikeal/request/commit/b58022ecda782af93e35e5f9601013b90b09ca73) add "forever" method (@thejh) +- [79d4651](https://github.com/mikeal/request/commit/79d46510ddff2e2c12c69f7ae4072ec489e27b0e) remove logging (@thejh) +- [f87cbf6](https://github.com/mikeal/request/commit/f87cbf6ec6fc0fc2869c340114514c887b304a80) retry on ECONNRESET on reused socket (@thejh) +- [1a91675](https://github.com/mikeal/request/commit/1a916757f4ec48b1282fddfa0aaa0fa6a1bf1267) Multipart requests should respect content-type if set; Issue #145 (@apeace) +- [#146](https://github.com/mikeal/request/pull/146) Multipart should respect content-type if previously set (@apeace) +- [#148](https://github.com/mikeal/request/pull/148) Retry Agent (@thejh) +- [70c5b63](https://github.com/mikeal/request/commit/70c5b63aca29a7d1629fa2909ff5b7199bbf0fd1) Publishing new version to npm. (@mikeal) +- [fc0f04b](https://github.com/mikeal/request/commit/fc0f04bab5d6be56a2c19d47d3e8386bd9a0b29e) Fix: timeout on socket, timeout after redirect +- [ef79e59](https://github.com/mikeal/request/commit/ef79e59bbb88ed3e7d4368fe3ca5eee411bda345) Fix: timeout after redirect 2 +- [c32a218](https://github.com/mikeal/request/commit/c32a218da2296e89a269f1832d95b12c4aa10852) merge master (@jroes) +- [d2d9b54](https://github.com/mikeal/request/commit/d2d9b545e5679b829d33deeba0b22f9050fd78b1) add line to docs describing followAllRedirects option (@jroes) +- [#90](https://github.com/mikeal/request/pull/90) add option followAllRedirects to follow post/put redirects (@jroes) +- [c08ab7e](https://github.com/mikeal/request/commit/c08ab7efaefd39c04deb6986716efe5a6069528e) Emit an event after we create the request object so that people can manipulate it before nextTick(). (@mikeal) +- [#162](https://github.com/mikeal/request/pull/162) Fix issue #159 (@dpetukhov) +- [e77a169](https://github.com/mikeal/request/commit/e77a1695c5c632c067857e99274f28a1d74301fe) fixing streaming example. fixes #164 (@mikeal) +- [ee53386](https://github.com/mikeal/request/commit/ee53386d85975c79b801edbb4f5bb7ff4c5dc90b) fixes #127 (@mikeal) +- [e2cd9de](https://github.com/mikeal/request/commit/e2cd9de9a9d10e1aa4cf4e26006bb30fa5086f0b) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [a0ab977](https://github.com/mikeal/request/commit/a0ab9770a8fb89f970bb3783ed4e6dde9e33511b) Added failing test for #125. (@papandreou) +- [c80800a](https://github.com/mikeal/request/commit/c80800a834b0f8bc0fb40d1fad4d4165a83369fd) Fix cookie jar/headers.cookie collision. Closes #125. (@papandreou) +- [1ac9e2d](https://github.com/mikeal/request/commit/1ac9e2d1bf776728a1fe676dd3693ef66f50f7f7) Redirect test: Also assert that the request cookie doesn't get doubled in the request for the landing page. (@papandreou) +- [07bbf33](https://github.com/mikeal/request/commit/07bbf331e2a0d40d261487f6222e8cafee0e50e3) Fixes #150 (@mikeal) +- [c640eed](https://github.com/mikeal/request/commit/c640eed292c06eac3ec89f60031ddf0fc0add732) Cookie jar handling: Don't double the cookies on each redirect (see discussion on #139). (@papandreou) +- [808de8b](https://github.com/mikeal/request/commit/808de8b0ba49d4bb81590ec37a873e6be4d9a416) Adding some missing mime types #138 (@serby) +- [#161](https://github.com/mikeal/request/pull/161) Fix cookie jar/headers.cookie collision (#125) (@papandreou) +- [#168](https://github.com/mikeal/request/pull/168) Picking off an EasyFix by adding some missing mimetypes. (@serby) +- [2a30487](https://github.com/mikeal/request/commit/2a304879f4218c1e46195d882bc81c0f874be329) bugfix - allow add cookie to wrapped request (defaults) (@fabianonunes) +- [a18b4f1](https://github.com/mikeal/request/commit/a18b4f14559f56cf52ca1b421daa6a934d28d51b) Making pipeDest a public prototype method rather than keeping it private. (@mikeal) +- [#170](https://github.com/mikeal/request/pull/170) can't create a cookie in a wrapped request (defaults) (@fabianonunes) +- [49a0f60](https://github.com/mikeal/request/commit/49a0f604779c91dd1759a02cbb195ccbd8d73f5d) Structural refactor, getting read for composable API. (@mikeal) +- [5daa0b2](https://github.com/mikeal/request/commit/5daa0b28b06cf109614f19e76b0e0b9b25ee3baf) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [e4df85c](https://github.com/mikeal/request/commit/e4df85c72221bf09ee7e1eb54f6c881851bd4164) Composable API for OAuth. (@mikeal) +- [945ec40](https://github.com/mikeal/request/commit/945ec40baef968ddd468c3b4dfce01621e4a0e31) Composable form API (@mikeal) +- [c30b47f](https://github.com/mikeal/request/commit/c30b47f229522a75af85da269157377b4a7dc37d) Use this, return this. (@mikeal) +- [e908644](https://github.com/mikeal/request/commit/e908644a69f9107b954f13635736f1e640216aec) Composable multipart API. (@mikeal) +- [e115677](https://github.com/mikeal/request/commit/e115677b1a03576eb96386986c350f211a4f38cd) Composable jar. Guard against overwrites on retry. (@mikeal) +- [a482e48](https://github.com/mikeal/request/commit/a482e4802e11fd122b12e18d1b18b49850fef823) Updating copyright for the new year. (@mikeal) +- [3c6581a](https://github.com/mikeal/request/commit/3c6581a9d4508fe5d75e111ae0fb94c5e0078404) Adding clobber argument for appending to headers. thanks @isaacs (@mikeal) +- [54e6aca](https://github.com/mikeal/request/commit/54e6aca0ab5982621fc9b35500f2154e50c0c95d) Fixes #144. (@mikeal) +- [12f4997](https://github.com/mikeal/request/commit/12f4997ed83bfbfefa3fc5b5635bc9a6829aa0d7) Fixing clobber. (@mikeal) +- [2f34fd1](https://github.com/mikeal/request/commit/2f34fd13b7ec86cb1c67e0a58664b9e060a34a50) Added support for a "query" option value that is a hash of querystring values that is merged (taking precedence over) with the querystring passed in the uri string. (@csainty) +- [a32d9e7](https://github.com/mikeal/request/commit/a32d9e7069533fb727a71730dbaa0f62ebefb731) Added a js based test runner so I can run tests on windows. (@csainty) +- [e0b6ce0](https://github.com/mikeal/request/commit/e0b6ce063de0c4223c97982128bb8203caf4a331) Tidied up an issue where ?> was being appended to URLs. (@csainty) +- [d47150d](https://github.com/mikeal/request/commit/d47150d6748a452df336d8de9743218028a876db) Refactored to match the composable style (@csainty) +- [b7e0929](https://github.com/mikeal/request/commit/b7e0929837873a8132476bb2b4d2e2a0fdc7cd0f) implemented issue #173 allow uri to be first argument (@twilson63) +- [b7264a6](https://github.com/mikeal/request/commit/b7264a6626481d5da50a28c91ea0be7b688c9daf) removed debug line and reset ports (@twilson63) +- [76598c9](https://github.com/mikeal/request/commit/76598c92bee64376e5d431285ac1bf6783140dbb) removed npm-debug (@twilson63) +- [#177](https://github.com/mikeal/request/pull/177) Issue #173 Support uri as first and optional config as second argument (@twilson63) +- [0f24051](https://github.com/mikeal/request/commit/0f240517dea65337636a49cb1cc2b5327504430e) Renamed query to qs. It was actually my first choice, but there appeared to be conflicts with the qs = require('querystring'). These are no longer present though and must have been unrelated. (@csainty) +- [becedaa](https://github.com/mikeal/request/commit/becedaaa7681b0c4ad5c0a9b9922fc950f091af2) Changed test structure to no longer require a server, modeled on the oauth tests. This also lets me revert some of the changes I had to make to the test server and proxy tests (@csainty) +- [9b2bbf0](https://github.com/mikeal/request/commit/9b2bbf0c12e87a59320efac67759041cd4af913f) Modified how the qs function works, it now no longer tweaks the existing request uri, instead it recreates a new one. This allows me to revert all the other changes I had to make previously and gives a nice clean commit that is self contained. (@csainty) +- [5ac7e26](https://github.com/mikeal/request/commit/5ac7e26ce4f7bf5a334df91df83699891171c0ae) failing test for .pipe(dst, opts) (@substack) +- [3b2422e](https://github.com/mikeal/request/commit/3b2422e62fbd6359b841e59a2c1888db71a22c2c) fix for failing pipe opts test (@substack) +- [8788c8b](https://github.com/mikeal/request/commit/8788c8b8cba96662e9d94a96eb04d96b904adea3) added uri param for post, put, head, del shortcuts (@twilson63) +- [#179](https://github.com/mikeal/request/pull/179) fix to add opts in .pipe(stream, opts) (@substack) +- [#180](https://github.com/mikeal/request/pull/180) Modified the post, put, head and del shortcuts to support uri optional param (@twilson63) +- [37d0699](https://github.com/mikeal/request/commit/37d0699eb681e85b7df4896b0a68b6865e596cb3) Fixing end bug i introduced being stupid. (@mikeal) +- [3a97292](https://github.com/mikeal/request/commit/3a97292f45273fa2cc937c0698ba19964780b4bb) fixed defaults functionality to support (uri, options, callback) (@twilson63) +- [#182](https://github.com/mikeal/request/pull/182) Fix request.defaults to support (uri, options, callback) api (@twilson63) +- [c94b200](https://github.com/mikeal/request/commit/c94b200258fa48697e386121a3e114ab7bed2ecf) Switched npm test from the bash script to a node script so that it is cross-platform. (@csainty) +- [#176](https://github.com/mikeal/request/pull/176) Querystring option (@csainty) +- [3b1e609](https://github.com/mikeal/request/commit/3b1e6094451e8d34c93353177de9d76e9a805e43) Adding defaults test back in. (@mikeal) +- [b4ae0c2](https://github.com/mikeal/request/commit/b4ae0c2d50f018a90a3ec8daa1d14c92a99873b9) Fixing idiotic bug I introduced. (@mikeal) +- [32f76c8](https://github.com/mikeal/request/commit/32f76c8baaf784dc2f4f1871153b1796bcebdcfe) Pushed new version to npm. (@mikeal) +- [00d0d9f](https://github.com/mikeal/request/commit/00d0d9f432182f13a5b8aa2e3a2a144b5c179015) Adding accept header to json support. (@mikeal) +- [0f580e6](https://github.com/mikeal/request/commit/0f580e6f6317c5301a52c0b6963d58e27112abca) Add abort support to the returned request (@itay) +- [4505e6d](https://github.com/mikeal/request/commit/4505e6d39a44229bfe5dc4d9a920233e05a7dfdb) Fixing some edge streaming cases with redirects by reusing the Request object. (@mikeal) +- [eed57af](https://github.com/mikeal/request/commit/eed57af8fe3e16632e9e0043d4d7f4d147dbfb8f) Published new version. (@mikeal) +- [97386b5](https://github.com/mikeal/request/commit/97386b5d7315b5c83702ffc7d0b09e34ecb67e04) Fixing pretty bad bug from the composable refactor. (@mikeal) +- [b693ce6](https://github.com/mikeal/request/commit/b693ce64e16aaa859d4edc86f82fbb11e00d33c0) Move abort to a prototype method, don't raise error (@itay) +- [1330eef](https://github.com/mikeal/request/commit/1330eef3ec84a651a435c95cf1ff1a4003086440) Merge branch 'master' of git://github.com/mikeal/request (@itay) +- [#188](https://github.com/mikeal/request/pull/188) Add abort support to the returned request (@itay) +- [5ff4645](https://github.com/mikeal/request/commit/5ff46453e713da1ae66a0d510eda4919e4080abe) Style changes. (@mikeal) +- [2dbd1e4](https://github.com/mikeal/request/commit/2dbd1e4350c2941b795b0e5ee7c0a00cd04cce09) Fixing new params style on master for head request. (@mikeal) +- [14989b2](https://github.com/mikeal/request/commit/14989b2dfc6830dbdad5364930fba1d2995aba06) Pushed new version to npm. (@mikeal) +- [0ea2351](https://github.com/mikeal/request/commit/0ea2351ef017ada9b8472f8d73086715ebe30c6a) Fixes #190. outdated check on options.json from before we had boolean support. (@mikeal) +- [21bf78c](https://github.com/mikeal/request/commit/21bf78c264316f75f4e6c571461521cda6ccf088) Adds a block on DELETE requests in status 300-400 (@goatslacker) +- [0c0c201](https://github.com/mikeal/request/commit/0c0c20139b28b21a860f72b8ce0124046fae421d) Adds tests for GH-119 Fix (@goatslacker) +- [#193](https://github.com/mikeal/request/pull/193) Fixes GH-119 (@goatslacker) +- [5815a69](https://github.com/mikeal/request/commit/5815a697347f20658dc2bdfd0d06e41d0aa0dac4) Fixes #194. setTimeout only works on node 0.6+ (@mikeal) +- [1ddcd60](https://github.com/mikeal/request/commit/1ddcd605bc8936c5b3534e1cf9aa1b29fa2b060b) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [7b35b4f](https://github.com/mikeal/request/commit/7b35b4ff63bbdf133f0f600a88a87b5723d29bdf) Removing old checks for self.req, it's ensured if start() is called. Implementing early pause/resume for when streams try to pause/resume before any data is emitted. Fixes #195. (@mikeal) +- [f01b79b](https://github.com/mikeal/request/commit/f01b79bb651f64065bac8877739223527f5b5592) Make ForeverAgent work with HTTPS (@isaacs) +- [#197](https://github.com/mikeal/request/pull/197) Make ForeverAgent work with HTTPS (@isaacs) +- [8d85b57](https://github.com/mikeal/request/commit/8d85b57ebb81c9d2d0a6b94aed41bf2ab0e3ad09) Forever inherits bugfix (@isaacs) +- [#198](https://github.com/mikeal/request/pull/198) Bugfix on forever usage of util.inherits (@isaacs) +- [37446f5](https://github.com/mikeal/request/commit/37446f54bb21cf9c83ffa81d354d799ae7ecf9ed) Add a test of HTTPS strict with CA checking (@isaacs) +- [8378d2e](https://github.com/mikeal/request/commit/8378d2ef9b8121a9851d21b3f6ec8304bde61c9d) Support tunneling HTTPS requests over proxies (@isaacs) +- [#199](https://github.com/mikeal/request/pull/199) Tunnel (@isaacs) +- [f0052ac](https://github.com/mikeal/request/commit/f0052ac5e6ca9f3f4aa49f6cda6ba15eb5d8b8e6) Published new version to npm. (@mikeal) +- [cea668f](https://github.com/mikeal/request/commit/cea668f6f7d444831313ccc0e0d301d25f2bd421) Adding more explicit error when undefined is passed as uri or options. (@mikeal) +- [047b7b5](https://github.com/mikeal/request/commit/047b7b52f3b11f4c44a02aeb1c3583940ddb59c7) Fix special method functions that get passed an options object. (@mikeal) +- [746de0e](https://github.com/mikeal/request/commit/746de0ef2f564534b29eeb8f296a59bd2c3086a7) pass through Basic authorization option for HTTPS tunneling +- [6fda9d7](https://github.com/mikeal/request/commit/6fda9d7d75e24cc1302995e41e26a91e03fdfc9a) Always clobber internal objects for qs but preserve old querystring args when clobber is present. (@mikeal) +- [75ca7a2](https://github.com/mikeal/request/commit/75ca7a25bc9c6102e87f3660a25835c7fcd70edb) Merge branch 'master' of https://github.com/mikeal/request +- [3b9f0fd](https://github.com/mikeal/request/commit/3b9f0fd3da4ae74de9ec76e7c66c57a7f8641df2) Fix cookies so that attributes are case insensitive +- [fddbd6e](https://github.com/mikeal/request/commit/fddbd6ee7d531bc4a82f629633b9d1637cb039e8) Properly set cookies during redirects +- [0d0bdb7](https://github.com/mikeal/request/commit/0d0bdb793f908492d4086fae8744f1e33e68d8c6) Remove request body when following non-GET redirects +- [#203](https://github.com/mikeal/request/pull/203) Fix cookie and redirect bugs and add auth support for HTTPS tunnel (@milewise) +- [b5fa773](https://github.com/mikeal/request/commit/b5fa773994de1799cf53491db7f5f3ba32825b20) Replace all occurrences of special chars in RFC3986 (@chriso) +- [bc6cd6c](https://github.com/mikeal/request/commit/bc6cd6ca6c6157bad76f0b2b23d4993f389ba977) documenting additional behavior of json option (@jphaas) +- [80e4e43](https://github.com/mikeal/request/commit/80e4e43186de1e9dcfaa1c9a921451560b91267c) Fixes #215. (@mikeal) +- [51f343b](https://github.com/mikeal/request/commit/51f343b9adfc11ec1b2ddcfb52a57e1e13feacb2) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [89c0f1d](https://github.com/mikeal/request/commit/89c0f1dd324bc65ad9c07436fb2c8220de388c42) titlecase authorization for oauth (@visnup) +- [#217](https://github.com/mikeal/request/pull/217) need to use Authorization (titlecase) header with Tumblr OAuth (@visnup) +- [8c163eb](https://github.com/mikeal/request/commit/8c163eb9349459839fc720658979d5c97a955825) Double quotes are optional, and the space after the ; could be required (@janjongboom) +- [#224](https://github.com/mikeal/request/pull/224) Multipart content-type change (@janjongboom) +- [96f4b9b](https://github.com/mikeal/request/commit/96f4b9b1f7b937a92f3f94f10d6d02f8878b6107) Style changes. (@mikeal) +- [b131c64](https://github.com/mikeal/request/commit/b131c64816f621cf15f8c51e76eb105778b4aad8) Adding safe .toJSON method. fixes #167 (@mikeal) +- [05d6e02](https://github.com/mikeal/request/commit/05d6e02c31ec4e6fcfadbfbe5414e701710f6e55) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [74ca9a4](https://github.com/mikeal/request/commit/74ca9a4852b666d30dd71421e8cc8b8a83177148) Unified error and complete handling. Fixes #171 (@mikeal) +- [a86c7dc](https://github.com/mikeal/request/commit/a86c7dc7d0a7c640c7def4c0215e46e76a11ff56) Fixing followAllRedirects and all the redirect tests. (@mikeal) +- [#211](https://github.com/mikeal/request/pull/211) Replace all occurrences of special chars in RFC3986 (@chriso) +- [7e24e8a](https://github.com/mikeal/request/commit/7e24e8a48d0dcfe10d0cc08b3c4e9627b9a95a97) New version on npm, first 3.0 release candidate. (@mikeal) +- [22e0f0d](https://github.com/mikeal/request/commit/22e0f0d73459c11b81b0f66a2cde85492dd8e38f) Added test for .toJSON() (@mikeal) +- [df32746](https://github.com/mikeal/request/commit/df32746f157948b6ae05e87a35cf1768e065ef0b) Adding toJSON to npm test. (@mikeal) +- [e65bfba](https://github.com/mikeal/request/commit/e65bfba98f0886a059a268dcdceabf41aec1e5cc) New version in npm. (@mikeal) +- [2b95921](https://github.com/mikeal/request/commit/2b959217151aaff7a6e7cc15e2acfccd1bbb9b85) Fixing defaults when url is passed instead of uri. (@mikeal) +- [e0534d8](https://github.com/mikeal/request/commit/e0534d860b4931a7a6e645b328fd4418a5433057) Pushed new version to npm. (@mikeal) +- [d2dc835](https://github.com/mikeal/request/commit/d2dc83538379e9e1fafb94f5698c56b4a5318d8d) don't error when null is passed for options (@polotek) +- [db80bf0](https://github.com/mikeal/request/commit/db80bf0444bd98c45f635f305154b9da20eed328) expose initParams (@polotek) +- [8cf019c](https://github.com/mikeal/request/commit/8cf019c9f9f719694408840823e92da08ab9dac3) allow request.defaults to override the main request method (@polotek) +- [#240](https://github.com/mikeal/request/pull/240) don't error when null is passed for options (@polotek) +- [69d017d](https://github.com/mikeal/request/commit/69d017de57622429f123235cc5855f36b3e18d1c) added dynamic boundary for multipart requests (@zephrax) +- [fc13e18](https://github.com/mikeal/request/commit/fc13e185f5e28a280d347e61622ba708e1cd7bbc) added dynamic boundary for multipart requests (@zephrax) +- [#243](https://github.com/mikeal/request/pull/243) Dynamic boundary (@zephrax) +- [1764176](https://github.com/mikeal/request/commit/176417698a84c53c0a69bdfd2a05a2942919816c) Fixing the set-cookie header (@jeromegn) +- [#246](https://github.com/mikeal/request/pull/246) Fixing the set-cookie header (@jeromegn) +- [6f9da89](https://github.com/mikeal/request/commit/6f9da89348b848479c23192c04b3c0ddd5a4c8bc) do not set content-length header to 0 when self.method is GET or self.method is undefined (@sethbridges) +- [efc0ea4](https://github.com/mikeal/request/commit/efc0ea44d63372a30011822ad9d37bd3d7b85952) Experimental AWS signing. Signing code from knox. (@mikeal) +- [4c08a1c](https://github.com/mikeal/request/commit/4c08a1c10bc0ebb679e212ad87419f6c4cc341eb) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [fdb10eb](https://github.com/mikeal/request/commit/fdb10eb493110b8e6e4f679524f38cef946e3f08) Adding support for aws in options. (@mikeal) +- [dac6a30](https://github.com/mikeal/request/commit/dac6a301ae03207af88fae6f5017e82157b79b41) Fixing upgraded stat size and supporting content-type and content-md5 properly. (@mikeal) +- [98cb503](https://github.com/mikeal/request/commit/98cb50325e1d7789fd9f44523d2315df5f890d10) Allow body === '' /* the empty string */. (@Filirom1) +- [0e9ac12](https://github.com/mikeal/request/commit/0e9ac12c69aaca370fbca94b41358e1c3a2f6170) fixed just another global leak of i (@sreuter) +- [#260](https://github.com/mikeal/request/pull/260) fixed just another leak of 'i' (@sreuter) +- [#255](https://github.com/mikeal/request/pull/255) multipart allow body === '' ( the empty string ) (@Filirom1) +- [#249](https://github.com/mikeal/request/pull/249) Fix for the fix of your (closed) issue #89 where self.headers[content-length] is set to 0 for all methods (@sethbridges) +- [adc9ab1](https://github.com/mikeal/request/commit/adc9ab1f563f3cb4681ac8241fcc75e6099efde2) style changes. making @rwaldron cry (@mikeal) +- [155e6ee](https://github.com/mikeal/request/commit/155e6ee270924d5698d3fea37cefc1926cbaf998) Fixed `pool: false` to not use the global agent (@timshadel) +- [1232a8e](https://github.com/mikeal/request/commit/1232a8e46752619d4d4b51d558e6725faf7bf3aa) JSON test should check for equality (@timshadel) +- [#261](https://github.com/mikeal/request/pull/261) Setting 'pool' to 'false' does NOT disable Agent pooling (@timshadel) +- [#262](https://github.com/mikeal/request/pull/262) JSON test should check for equality (@timshadel) +- [914a723](https://github.com/mikeal/request/commit/914a72300702a78a08263fe98a43d25e25713a70) consumer_key and token_secret need to be encoded for OAuth v1 (@nanodocumet) +- [500e790](https://github.com/mikeal/request/commit/500e790f8773f245ff43dd9c14ec3d5c92fe0b9e) Fix uncontrolled crash when "this.uri" is an invalid URI (@naholyr) +- [#265](https://github.com/mikeal/request/pull/265) uncaughtException when redirected to invalid URI (@naholyr) +- [#263](https://github.com/mikeal/request/pull/263) Bug in OAuth key generation for sha1 (@nanodocumet) +- [f4b87cf](https://github.com/mikeal/request/commit/f4b87cf439453b3ca1d63e85b3aeb3373ee1f17e) I'm not OCD seriously (@TehShrike) +- [#268](https://github.com/mikeal/request/pull/268) I'm not OCD seriously (@TehShrike) +- [fcab7f1](https://github.com/mikeal/request/commit/fcab7f1953cd6fb141a7d98f60580c50b59fb73f) Adding a line break to the preamble as the first part of a multipart was not recognized by a server I was communicating with. (@proksoup) +- [661b62e](https://github.com/mikeal/request/commit/661b62e5319bf0143312404f1fc81c895c46f6e6) Commenting out failing post test. Need to figure out a way to test this now that the default is to use a UUID for the frontier. (@mikeal) +- [7165c86](https://github.com/mikeal/request/commit/7165c867fa5dea4dcb0aab74d2bf8ab5541e3f1b) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [5a7ca9b](https://github.com/mikeal/request/commit/5a7ca9b398c1300c08a28fb7f266054c3ce8c57a) Added drain event and returning the boolean from write to proper handle back pressure when piping. (@mafintosh) +- [#273](https://github.com/mikeal/request/pull/273) Pipe back pressure issue (@mafintosh) +- [f8ae8d1](https://github.com/mikeal/request/commit/f8ae8d18627e4743996d8600f77f4e4c05a2a590) New version in npm. (@mikeal) +- [7ff5dae](https://github.com/mikeal/request/commit/7ff5daef152bcfac5b02e661e5476a57b9693489) Merge remote-tracking branch 'upstream/master' (@proksoup) +- [1f34700](https://github.com/mikeal/request/commit/1f34700e5614ea2a2d78b80dd467c002c3e91cb3) fix tests with boundary by injecting boundry from header (@benatkin) +- [ee2b2c2](https://github.com/mikeal/request/commit/ee2b2c2f7a8625fde4d71d79e19cdc5d98f09955) Like in [node.js](https://github.com/joyent/node/blob/master/lib/net.js#L52) print logs if NODE_DEBUG contains the word request (@Filirom1) +- [#279](https://github.com/mikeal/request/pull/279) fix tests with boundary by injecting boundry from header (@benatkin) +- [3daebaf](https://github.com/mikeal/request/commit/3daebaf2551c8d0df7dac1ebff0af4fe08608768) Merge branch 'master' of https://github.com/mikeal/request (@proksoup) +- [dba2ebf](https://github.com/mikeal/request/commit/dba2ebf09552258f37b60122c19b236064b0d216) Updating with corresponding tests. (@proksoup) +- [396531d](https://github.com/mikeal/request/commit/396531d083c94bc807a25f7c3a50a0c92a00c5f7) Removing console.log of multipart (@proksoup) +- [54226a3](https://github.com/mikeal/request/commit/54226a38816b4169e0a7a5d8b1a7feba78235fec) Okay, trying it as an optional parameter, with a new test in test-body.js to verify (@proksoup) +- [23ae7d5](https://github.com/mikeal/request/commit/23ae7d576cc63d645eecf057112b71d6cb73e7b1) Remove non-"oauth_" parameters from being added into the OAuth Authorization header (@jplock) +- [8b82ef4](https://github.com/mikeal/request/commit/8b82ef4ff0b50b0c8dcfb830f62466fa30662666) Removing guard, there are some cases where this is valid. (@mikeal) +- [82440f7](https://github.com/mikeal/request/commit/82440f76f22a5fca856735af66e2dc3fcf240c0d) Adding back in guard for _started, need to keep some measure of safety but we should defer this restriction for as long as possible. (@mikeal) +- [#282](https://github.com/mikeal/request/pull/282) OAuth Authorization header contains non-"oauth_" parameters (@jplock) +- [087be3e](https://github.com/mikeal/request/commit/087be3ebbada53699d14839374f1679f63f3138f) Remove stray `console.log()` call in multipart generator. (@bcherry) +- [0a8a5ab](https://github.com/mikeal/request/commit/0a8a5ab6a08eaeffd45ef4e028be2259d61bb0ee) Merge remote-tracking branch 'upstream/master' (@proksoup) +- [#241](https://github.com/mikeal/request/pull/241) Composability updates suggested by issue #239 (@polotek) +- [#284](https://github.com/mikeal/request/pull/284) Remove stray `console.log()` call in multipart generator. (@bcherry) +- [8344666](https://github.com/mikeal/request/commit/8344666f682a302c914cce7ae9cea8de054f9240) Fix #206 Change HTTP/HTTPS agent when redirecting between protocols (@isaacs) +- [#272](https://github.com/mikeal/request/pull/272) Boundary begins with CRLF? (@proksoup) +- [#214](https://github.com/mikeal/request/pull/214) documenting additional behavior of json option (@jphaas) +- [#207](https://github.com/mikeal/request/pull/207) Fix #206 Change HTTP/HTTPS agent when redirecting between protocols (@isaacs) +- [9cadd61](https://github.com/mikeal/request/commit/9cadd61d989e85715ea07da8770a3077db41cca3) Allow parser errors to bubble up to request (@mscdex) +- [6a00fea](https://github.com/mikeal/request/commit/6a00fea09eed99257c0aec2bb66fbf109b0f573a) Only add socket error handler callback once (@mscdex) +- [975ea90](https://github.com/mikeal/request/commit/975ea90bed9503c67055b20e36baf4bcba54a052) Fix style (@mscdex) +- [205dfd2](https://github.com/mikeal/request/commit/205dfd2e21c13407d89d3ed92dc2b44b987d962b) Use .once() when listening for parser error (@mscdex) +- [ff9b564](https://github.com/mikeal/request/commit/ff9b5643d6b5679a9e7d7997ec6275dac10b000e) Add a space after if (@Filirom1) +- [#280](https://github.com/mikeal/request/pull/280) Like in node.js print options if NODE_DEBUG contains the word request (@Filirom1) +- [d38e57b](https://github.com/mikeal/request/commit/d38e57bbb3d827aa87427f2130aa5a5a3a973161) Test for #289 (@isaacs) +- [820af58](https://github.com/mikeal/request/commit/820af5839f2a193d091d98f23fd588bd919e3e58) A test of POST redirect following with 303 status (@isaacs) +- [7adc5a2](https://github.com/mikeal/request/commit/7adc5a21869bc92cc3b5e84d32c585952c8e5e87) Use self.encoding when calling Buffer.toString() (@isaacs) +- [#290](https://github.com/mikeal/request/pull/290) A test for #289 (@isaacs) +- [#293](https://github.com/mikeal/request/pull/293) Allow parser errors to bubble up to request (@mscdex) +- [ed68b8d](https://github.com/mikeal/request/commit/ed68b8dd024561e9d47d80df255fb79d783c13a7) Updated the twitter oauth dance. The comments weren't clear. Also removed token_key. No longer needed with twitter oauth. (@joemccann) +- [6bc19cd](https://github.com/mikeal/request/commit/6bc19cda351b59f8e45405499a100abd0b456e42) Forgot to remove token_secret; no longer needed for twitter. (@joemccann) +- [1f21b17](https://github.com/mikeal/request/commit/1f21b17fc4ff3a7011b23e3c9261d66effa3aa40) Adding form-data support. (@mikeal) +- [827e950](https://github.com/mikeal/request/commit/827e950500746eb9d3a3fa6f174416b194c9dedf) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [b211200](https://github.com/mikeal/request/commit/b2112009a31fc7f9122970d392750f62b6e77111) Test fixes for relative import. Adding to run all (@mikeal) +- [1268195](https://github.com/mikeal/request/commit/1268195b75bd5bb3954b4c4f2d9feb80a97994d1) Bundling mime module rather than keep around our own mime-map. (@mikeal) +- [4f51cec](https://github.com/mikeal/request/commit/4f51cecdc363946b957585c3deccfd8c37e19aa0) Docs for the form API, pumping version. (@mikeal) +- [90245d7](https://github.com/mikeal/request/commit/90245d7199215d7b195cf7e36b203ca0bd0a6bd3) Doc fixes. (@mikeal) +- [d98ef41](https://github.com/mikeal/request/commit/d98ef411c560bd1168f242c524a378914ff8eac4) Pushed new version to npm. (@mikeal) +- [3e11937](https://github.com/mikeal/request/commit/3e119375acda2da225afdb1596f6346dbd551fba) Pass servername to tunneling secure socket creation (@isaacs) +- [7725b23](https://github.com/mikeal/request/commit/7725b235fdec8889c0c91d55c99992dc683e2e22) Declare dependencies more sanely (@isaacs) +- [#317](https://github.com/mikeal/request/pull/317) Workaround for #313 (@isaacs) +- [#318](https://github.com/mikeal/request/pull/318) Pass servername to tunneling secure socket creation (@isaacs) +- [0c470bc](https://github.com/mikeal/request/commit/0c470bccf1ec097ae600b6116e6244cb624dc00e) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [0d98e5b](https://github.com/mikeal/request/commit/0d98e5b7ea6bd9c4f21535d3682bbed2f2e05df4) Pushed new version to npm. (@mikeal) +- [64a4448](https://github.com/mikeal/request/commit/64a44488ac8c792a1f548f305fc5c61efe0d77fb) when setting defaults, the wrapper adds the jar method assuming it has the same signature as get, meaning undefined is passed into initParams, which subsequently fails. now passing jar function directly as it has no need of defaults anyway seeing as it only creates a new cookie jar (@StuartHarris) +- [48c9881](https://github.com/mikeal/request/commit/48c988118bda4691fffbfcf30d5a39b6c1438736) Added test to illustrate #321 (@alexindigo) +- [8ce0f2a](https://github.com/mikeal/request/commit/8ce0f2a3b6929cd0f7998e00d850eaf5401afdb7) Added *src* stream removal on redirect. #321 (@alexindigo) +- [c32f0bb](https://github.com/mikeal/request/commit/c32f0bb9feaa71917843856c23b4aae99f78ad4d) Do not try to remove listener from an undefined connection (@strk) +- [#326](https://github.com/mikeal/request/pull/326) Do not try to remove listener from an undefined connection (@CartoDB) +- [#322](https://github.com/mikeal/request/pull/322) Fix + test for piped into request bumped into redirect. #321 (@alexindigo) +- [85b6a63](https://github.com/mikeal/request/commit/85b6a632ac7d3456485fbf931043f10f5f6344a5) New version in npm. (@mikeal) +- [f462bd3](https://github.com/mikeal/request/commit/f462bd3fa421fa5e5ca6c91852333db90297b80e) Rolling trunk version. (@mikeal) +- [8a82c5b](https://github.com/mikeal/request/commit/8a82c5b0990cc58fa4cb7f81814d13ba7ae35453) Adding url to redirect error for better debugging. (@mikeal) +- [013c986](https://github.com/mikeal/request/commit/013c986d0a8b5b2811cd06dd3733f4a3d37df1cc) Better debugging of max redirect errors. (@mikeal) +- [#320](https://github.com/mikeal/request/pull/320) request.defaults() doesn't need to wrap jar() (@redbadger) +- [4797f88](https://github.com/mikeal/request/commit/4797f88b42c3cf8680cbde09bf473678a5707aed) Fix #296 - Only set Content-Type if body exists (@Marsup) +- [f6bcf3e](https://github.com/mikeal/request/commit/f6bcf3eb51982180e813c69cccb942734f815ffe) fixup aws function to work in more situations (@nlf) +- [ba6c88a](https://github.com/mikeal/request/commit/ba6c88af5e771c2a0e007e6166e037a149561e09) added short blurb on using aws (@nlf) +- [#343](https://github.com/mikeal/request/pull/343) Allow AWS to work in more situations, added a note in the README on its usage (@nathan-lafreniere) +- [288c52a](https://github.com/mikeal/request/commit/288c52a2a1579164500c26136552827112801ff1) switch to a case insensitive getter when fetching headers for aws auth signing (@nlf) +- [#332](https://github.com/mikeal/request/pull/332) Fix #296 - Only set Content-Type if body exists (@Marsup) +- [7a16286](https://github.com/mikeal/request/commit/7a162868de65b6de15e00c1f707b5e0f292c5f86) Emit errors for anything in init so that it is catchable in a redirect. (@mikeal) +- [d288d21](https://github.com/mikeal/request/commit/d288d21d709fa81067f5af53737dfde06f842262) fix bug (@azylman) +- [#355](https://github.com/mikeal/request/pull/355) stop sending erroneous headers on redirected requests (@azylman) +- [b0b97f5](https://github.com/mikeal/request/commit/b0b97f53a9e94f3aeaa05e2cda5b820668f6e3b2) delete _form along with everything else on a redirect (@jgautier) +- [#360](https://github.com/mikeal/request/pull/360) Delete self._form along with everything else on redirect (@jgautier) +- [61e3850](https://github.com/mikeal/request/commit/61e3850f0f91ca6732fbd06b46796fbcd2fea1ad) Made it so that if we pass in Content-Length or content-length in the headers, don't make a new version (@danjenkins) +- [#361](https://github.com/mikeal/request/pull/361) Don't create a Content-Length header if we already have it set (@danjenkins) +- [590452d](https://github.com/mikeal/request/commit/590452d6569e68e480d4f40b88022f1b81914ad6) inside oauth.hmacsign: running rfc3986 on base_uri instead of just encodeURIComponent. +- [#362](https://github.com/mikeal/request/pull/362) Running `rfc3986` on `base_uri` in `oauth.hmacsign` instead of just `encodeURIComponent` (@jeffmarshall) +- [f7dc90c](https://github.com/mikeal/request/commit/f7dc90c8dae743d5736dc6c807eecde613eb4fd4) Revert "Merge pull request #362 from jeffmarshall/master" (@mikeal) +- [d631a26](https://github.com/mikeal/request/commit/d631a26e263077eca3d4925de9b0a8d57365ba90) reintroducing the WTF escape + encoding, also fixing a typo. +- [#363](https://github.com/mikeal/request/pull/363) rfc3986 on base_uri, now passes tests (@jeffmarshall) +- [bfe2791](https://github.com/mikeal/request/commit/bfe2791f596b749eed6961159d41a404c3aba0d0) oauth fix. (@mikeal) +- [#344](https://github.com/mikeal/request/pull/344) Make AWS auth signing find headers correctly (@nathan-lafreniere) +- [e863f25](https://github.com/mikeal/request/commit/e863f25336abc7b9f9936c20e0c06da8db0c6593) style change. (@mikeal) +- [3e5a87c](https://github.com/mikeal/request/commit/3e5a87ce28b3bb45861b32f283cd20d0084d78a7) Don't remove x_auth_type for Twitter reverse auth (@drudge) +- [#369](https://github.com/mikeal/request/pull/369) Don't remove x_auth_mode for Twitter reverse auth (@drudge) +- [25d4667](https://github.com/mikeal/request/commit/25d466773c43949e2eea4236ffc62841757fd1f0) x_auth_mode not x_auth_type (@drudge) +- [#370](https://github.com/mikeal/request/pull/370) Twitter reverse auth uses x_auth_mode not x_auth_type (@drudge) +- [cadf4dc](https://github.com/mikeal/request/commit/cadf4dc54f4ee3fae821f6beb1ea6443e528bf6f) massive style commit. (@mikeal) +- [33453a5](https://github.com/mikeal/request/commit/33453a53bc37e4499853b9d929b3603cdf7a31cd) New version in npm. (@mikeal) +- [b638185](https://github.com/mikeal/request/commit/b6381854006470af1d0607f636992c7247b6720f) Setting master version. (@mikeal) +- [8014d2a](https://github.com/mikeal/request/commit/8014d2a5b797f07cf56d2f39a346031436e1b064) correct Host header for proxy tunnel CONNECT (@ypocat) +- [#374](https://github.com/mikeal/request/pull/374) Correct Host header for proxy tunnel CONNECT (@ypocat) +- [8c3e9cb](https://github.com/mikeal/request/commit/8c3e9cb529767cff5e7206e2e76531183085b42a) If one of the request parameters is called "timestamp", the "oauth_timestamp" OAuth parameter will get removed during the parameter cleanup loop. (@jplock) +- [#375](https://github.com/mikeal/request/pull/375) Fix for missing oauth_timestamp parameter (@jplock) +- [69e6dc5](https://github.com/mikeal/request/commit/69e6dc5c80e67bbd7d135c3ceb657a1b2df58763) Fixed headers piping on redirects (@kapetan) +- [#376](https://github.com/mikeal/request/pull/376) Headers lost on redirect (@kapetan) +- [62dbbf3](https://github.com/mikeal/request/commit/62dbbf3d77b0851ba424d4f09d1d0c0be91c1f2d) Resolving the Invalid signature when using "qs" (@landeiro) +- [d4cf4f9](https://github.com/mikeal/request/commit/d4cf4f98e11f9a85b6bdfd0481c85c8ac34061ce) fixes missing host header on retried request when using forever agent +- [#380](https://github.com/mikeal/request/pull/380) Fixes missing host header on retried request when using forever agent (@mac-) +- [#381](https://github.com/mikeal/request/pull/381) Resolving "Invalid signature. Expected signature base string: " (@landeiro) +- [ea2f975](https://github.com/mikeal/request/commit/ea2f975ae83efe956b77cbcd0fd9ad42c0d5192f) Ensure that uuid is treated as a property name, not an index. (@othiym23) +- [#388](https://github.com/mikeal/request/pull/388) Ensure "safe" toJSON doesn't break EventEmitters (@othiym23) +- [11a3bc0](https://github.com/mikeal/request/commit/11a3bc0ea3063f6f0071248e03c8595bfa9fd046) Add more reporting to tests (@mmalecki) +- [#398](https://github.com/mikeal/request/pull/398) Add more reporting to tests (@mmalecki) +- [b85bf63](https://github.com/mikeal/request/commit/b85bf633fe8197dc38855f10016a0a76a8ab600a) Optimize environment lookup to happen once only (@mmalecki) +- [#403](https://github.com/mikeal/request/pull/403) Optimize environment lookup to happen once only (@mmalecki) +- [dbb9a20](https://github.com/mikeal/request/commit/dbb9a205fafd7bf5a05d2dbe7eb2c6833b4387dc) renaming tests/googledoodle.png to match it's actual image type of jpeg (@nfriedly) +- [e2d7d4f](https://github.com/mikeal/request/commit/e2d7d4fd35869354ba14a333a4b4989b648e1971) Add more auth options, including digest support (@nylen) +- [d0d536c](https://github.com/mikeal/request/commit/d0d536c1e5a9a342694ffa5f14ef8fbe8dcfa8bd) Add tests for basic and digest auth (@nylen) +- [85fd359](https://github.com/mikeal/request/commit/85fd359890646ef9f55cc6e5c6a32e74f4fbb786) Document new auth options (@nylen) +- [#338](https://github.com/mikeal/request/pull/338) Add more auth options, including digest support (@nylen) +- [fd2e2fa](https://github.com/mikeal/request/commit/fd2e2fa1e6d580cbc34afd3ae1200682cecb3cf9) Fixed a typo. (@jerem) +- [#415](https://github.com/mikeal/request/pull/415) Fixed a typo. (@jerem) +- [53c1508](https://github.com/mikeal/request/commit/53c1508c9c6a58f7d846de82cad36402497a4a4f) Fix for #417 (@mikeal) +- [b23f985](https://github.com/mikeal/request/commit/b23f985e02da4a96f1369541a128c4204a355666) Fixing merge conflict. (@mikeal) +- [28e8be5](https://github.com/mikeal/request/commit/28e8be5175793ac99236df88e26c0139a143e32d) Lost a forever fix in the previous merge. Fixing. (@mikeal) +- [e4d1e25](https://github.com/mikeal/request/commit/e4d1e25c1648ef91f6baf1ef407c712509af4b66) Copy options before adding callback. (@nrn) +- [22bc67d](https://github.com/mikeal/request/commit/22bc67d7ac739e9c9f74c026f875a0a7c686e29d) Respect specified {Host,host} headers, not just {host} (@andrewschaaf) +- [#430](https://github.com/mikeal/request/pull/430) Respect specified {Host,host} headers, not just {host} (@andrewschaaf) +- [6b11acf](https://github.com/mikeal/request/commit/6b11acf3e29fb84daef4e940314cae5ac2e580c6) Updating form-data. (@mikeal) +- [d195845](https://github.com/mikeal/request/commit/d195845c3e1de42c9aee752eec8efa4dda87ec74) Updating mime (@mikeal) +- [20ba1d6](https://github.com/mikeal/request/commit/20ba1d6d38191aa7545b927a7262a18c5c63575b) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [0150d9f](https://github.com/mikeal/request/commit/0150d9fa13e51d99880013b9ec29343850b40c2f) Consider `options.rejectUnauthorized` when pooling https agents (@mmalecki) +- [3e07b6d](https://github.com/mikeal/request/commit/3e07b6d4b81037d0e6e595670db483708ffa8698) Use `rejectUnauthorized: false` in tests (@mmalecki) +- [3995878](https://github.com/mikeal/request/commit/3995878d9fff18a8707f27ffeb4ed6401086adce) Support `key` and `cert` options (@mmalecki) +- [#433](https://github.com/mikeal/request/pull/433) Added support for HTTPS cert & key (@indexzero) +- [8b0f4e8](https://github.com/mikeal/request/commit/8b0f4e8fba33d578a891218201d87e3316ea9844) Released 2.14.0 (@mikeal) +- [54172c6](https://github.com/mikeal/request/commit/54172c68cab8360372e1e64e3fa14902662950bd) Rolling master version. (@mikeal) +- [aa4a285](https://github.com/mikeal/request/commit/aa4a28586354901b0c9b298a0aa79abb5ed175af) Add patch convenience method. (@mloar) +- [66501b9](https://github.com/mikeal/request/commit/66501b9872abc9a2065430cd5ed4a34dd45c8bee) protect against double callback (@spollack) +- [#444](https://github.com/mikeal/request/pull/444) protect against double callbacks on error path (@spollack) +- [#448](https://github.com/mikeal/request/pull/448) Convenience method for PATCH (@mloar) +- [6f0f8c5](https://github.com/mikeal/request/commit/6f0f8c5ee2b2fdc7118804664c2215fe9cb5a2f2) No longer doing bundle dependencies (@mikeal) +- [3997f98](https://github.com/mikeal/request/commit/3997f980722241c18454a00aeeda07d701c27a8f) No longer using bundle dependencies (@mikeal) +- [cba36ce](https://github.com/mikeal/request/commit/cba36ce64e68bd26e230b65f81256776ac66e686) Adding hawk signing to request. (@mikeal) +- [c7a8be6](https://github.com/mikeal/request/commit/c7a8be6d174eff05a9cb2fda987979e475d8543f) Fixing bug in empty options. (@mikeal) +- [67d753f](https://github.com/mikeal/request/commit/67d753fec99fa1f5a3b35ec0bbbc98896418d86c) node-uuid is much better. (@mikeal) +- [337718b](https://github.com/mikeal/request/commit/337718baa08cafb3e706d275fd7344a3c92363bb) Smarter test runner. (@mikeal) +- [bcc33ac](https://github.com/mikeal/request/commit/bcc33aca57baf6fe2a81fbf5983048c9220c71b1) Moved the cookie jar in to it's own module. (@mikeal) +- [3261be4](https://github.com/mikeal/request/commit/3261be4b5d6f45f62b9f50bec18af770cbb70957) Put aws signing in its own package. (@mikeal) +- [fbed723](https://github.com/mikeal/request/commit/fbed7234d7b532813105efdc4c54777396a6773b) OAuth signing is now in its own library. (@mikeal) +- [ef5ab90](https://github.com/mikeal/request/commit/ef5ab90277fb00d0e8eb1c565b0f6ef8c52601d3) Forever agent is now it's own package. (@mikeal) +- [ca1ed81](https://github.com/mikeal/request/commit/ca1ed813c62c7493dc77108b3efc907cc36930cb) tunneling agent is now it's own library. (@mikeal) +- [5c75621](https://github.com/mikeal/request/commit/5c75621ba5cea18bcf114117112121d361e5f3c9) Moving from main.js to index. cause it's not 2010 anymore. (@mikeal) +- [#413](https://github.com/mikeal/request/pull/413) rename googledoodle.png to .jpg (@nfriedly) +- [b4c4c28](https://github.com/mikeal/request/commit/b4c4c28424d906cd96a2131010b21d7facf8b666) Merge branch 'master' of github.com:mikeal/request (@nrn) +- [#310](https://github.com/mikeal/request/pull/310) Twitter Oauth Stuff Out of Date; Now Updated (@joemccann) +- [8b0e7e8](https://github.com/mikeal/request/commit/8b0e7e8c9d196d7286d1563aa54affcc4c8b0e1d) Comment to explain init() and start(). (@mikeal) +- [43d578d](https://github.com/mikeal/request/commit/43d578dc0206388eeae9584f540d550a06308fc8) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [b7c5ed4](https://github.com/mikeal/request/commit/b7c5ed48b618f71f138f9f08f8d705336f907e01) destroy the response if present when destroying the request (@mafintosh) +- [b279277](https://github.com/mikeal/request/commit/b279277dc2fb4b649640322980315d74db0d13f3) response.abort should be response.destroy (@mafintosh) +- [#454](https://github.com/mikeal/request/pull/454) Destroy the response if present when destroying the request (clean merge) (@mafintosh) +- [#429](https://github.com/mikeal/request/pull/429) Copy options before adding callback. (@nrn) +- [e0e0fb4](https://github.com/mikeal/request/commit/e0e0fb451f17945a02203639e4836aa327b4e30b) hawk 0.9.0 (@hueniverse) +- [#456](https://github.com/mikeal/request/pull/456) hawk 0.9.0 (@hueniverse) +- [2f60bc2](https://github.com/mikeal/request/commit/2f60bc253ff6e28df58a33da24b710b6d506849f) Fixes #453 (@mikeal) +- [805b6e4](https://github.com/mikeal/request/commit/805b6e4fe3afeeb407b4fca2e34e9caabe30f747) Fixing hawk README to match new usage. (@mikeal) +- [8feb957](https://github.com/mikeal/request/commit/8feb957911083bce552d1898b7ffcaa87104cd21) Removing old logref code. (@mikeal) +- [fcf6d67](https://github.com/mikeal/request/commit/fcf6d6765247a2645a233d95468ade2960294074) Safe stringify. (@mikeal) +- [62455bc](https://github.com/mikeal/request/commit/62455bca81e8760f25a2bf1dec2b06c8e915de79) hawk 0.10 (@hueniverse) +- [c361b41](https://github.com/mikeal/request/commit/c361b4140e7e6e4fe2a8f039951b65d54af65f42) hawk 0.10 (@hueniverse) +- [fa1ef30](https://github.com/mikeal/request/commit/fa1ef30dcdac83b271ce38c71975df0ed96b08f7) Strip the UTF8 BOM from a UTF encoded response (@kppullin) +- [9d636c0](https://github.com/mikeal/request/commit/9d636c0b3e882742e15ba989d0c2413f95364680) if query params are empty, then request path shouldn't end with a '?' (@jaipandya) +- [#462](https://github.com/mikeal/request/pull/462) if query params are empty, then request path shouldn't end with a '?' (merges cleanly now) (@jaipandya) +- [#460](https://github.com/mikeal/request/pull/460) hawk 0.10.0 (@hueniverse) +- [#461](https://github.com/mikeal/request/pull/461) Strip the UTF8 BOM from a UTF encoded response (@kppullin) +- [6d29ed7](https://github.com/mikeal/request/commit/6d29ed72e34f3b2b6d8a5cfadd96dd26b3dd246d) Moving response handlers to onResponse. (@mikeal) +- [885d6eb](https://github.com/mikeal/request/commit/885d6ebeb6130c2ab7624304f4a01a898573390b) Using querystring library from visionmedia (@kbackowski) +- [#471](https://github.com/mikeal/request/pull/471) Using querystring library from visionmedia (@kbackowski) +- [346bb42](https://github.com/mikeal/request/commit/346bb42898c5804576d9e9b3adf40123260bf73b) On strictSSL set rejectUnauthorized. (@mikeal) +- [8a45365](https://github.com/mikeal/request/commit/8a453656a705d2fa98fbf9092b1600d2ddadbb5a) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [32cfd3c](https://github.com/mikeal/request/commit/32cfd3cf7b3f23c2b1d36c5ccb475cbb3a4693ff) Style changes. (@mikeal) +- [ec07ee2](https://github.com/mikeal/request/commit/ec07ee2d3eeb90b6d0ad9f6d7f3a36da72276841) Print debug logs NODE_DEBUG=request in environment (@isaacs) +- [681af64](https://github.com/mikeal/request/commit/681af644a2ebccad8bcccb75984f7f10f909b382) Flow data in v0.10-style streams (@isaacs) +- [#473](https://github.com/mikeal/request/pull/473) V0.10 compat (@isaacs) +- [f07a8ba](https://github.com/mikeal/request/commit/f07a8baebf7001addbc0f7d7c869adddc21768ce) Release. (@mikeal) +- [1f947a1](https://github.com/mikeal/request/commit/1f947a1d2728147fbf4f57aa361d0bedcebfc206) Rolling master version. (@mikeal) +- [7a217bb](https://github.com/mikeal/request/commit/7a217bbdced9a05a786fe6534ab52734df342d3e) Reinstate querystring for `unescape` (@shimaore) +- [b0b4ca9](https://github.com/mikeal/request/commit/b0b4ca913e119337e9313a157eee2f08f77ddc38) Test for `unescape` (@shimaore) +- [#475](https://github.com/mikeal/request/pull/475) Use `unescape` from `querystring` (@shimaore) +- [28fc741](https://github.com/mikeal/request/commit/28fc741fa958a9783031189964ef6f6d7e3f3264) Release. (@mikeal) +- [d3e28ef](https://github.com/mikeal/request/commit/d3e28ef7144da4d9f22f8fb475bd5aa6a80fb947) Rolling master version. (@mikeal) +- [8f8bb9e](https://github.com/mikeal/request/commit/8f8bb9ee8c4dcd9eb815249fbe2a7cf54f61b56f) Changing so if Accept header is explicitly set, sending json does not overwrite. (@RoryH) +- [#479](https://github.com/mikeal/request/pull/479) Changing so if Accept header is explicitly set, sending json does not ov... (@RoryH) +- [7694372](https://github.com/mikeal/request/commit/7694372f3dc9d57ac29ca7ee5c00146aa5e1e747) Proper version for latest. (@mikeal) +- [aa208cf](https://github.com/mikeal/request/commit/aa208cf5c682262529d749f592db147182cacfaf) 0.8+ only now (@mikeal) +- [16b5ab9](https://github.com/mikeal/request/commit/16b5ab9151823067b05b382241483ef10811c3e1) Upgrading qs. (@mikeal) +- [7d10c1e](https://github.com/mikeal/request/commit/7d10c1e83b4663f592c773e7fece83435585a06f) Merge branch 'master' of github.com:mikeal/request (@mikeal) +- [b8ca4b4](https://github.com/mikeal/request/commit/b8ca4b474b8215cab44ef8ef789303571b3d016f) pumping hawk version. (@mikeal) +- [9c0e484](https://github.com/mikeal/request/commit/9c0e48430e3a9de8715e77c07c98301399eaf6e3) release (@mikeal) +- [a9f1896](https://github.com/mikeal/request/commit/a9f189697e2a813bee9bff31de32a25e99e55cf2) rolling master version. (@mikeal) +- [560a1f8](https://github.com/mikeal/request/commit/560a1f8b927099e44b75274375a690df2a05de67) Set content-type on input. (@mikeal) +- [5fec436](https://github.com/mikeal/request/commit/5fec436b6602bc8c76133664bca23e98f511b096) Release. (@mikeal) +- [88d8d5b](https://github.com/mikeal/request/commit/88d8d5bc80679b78a39cab8e6d8295728a0a150d) Rolling version. (@mikeal) +- [d05b6ba](https://github.com/mikeal/request/commit/d05b6ba72702c2411b4627d4d89190a5f2aba562) Empty body must be passed as empty string, exclude JSON case (@Olegas) +- [#490](https://github.com/mikeal/request/pull/490) Empty response body (3-rd argument) must be passed to callback as an empty string (@Olegas) +- [8aa13cd](https://github.com/mikeal/request/commit/8aa13cd5b5e22b24466ef0e59fa8b5f1d0f0795a) Added redirect event (@Cauldrath) +- [4d63a04](https://github.com/mikeal/request/commit/4d63a042553c90718bf0b90652921b26c52dcb31) Moving response emit above setHeaders on destination streams (@kenperkins) +- [#498](https://github.com/mikeal/request/pull/498) Moving response emit above setHeaders on destination streams (@kenperkins) +- [c40993f](https://github.com/mikeal/request/commit/c40993fc987b1a8a3cb08cd5699b2f1b2bd4b28b) Fix a regression introduced by cba36ce6 (@nylen) +- [edc2e17](https://github.com/mikeal/request/commit/edc2e17e8154239efa6bd2914435798c18882635) Don't delete headers when retrying a request with proper authentication (@nylen) +- [a375ac1](https://github.com/mikeal/request/commit/a375ac15460f4f3b679f4418d7fc467a5cc94499) Refactor and expand basic auth tests (@nylen) +- [9bc28bf](https://github.com/mikeal/request/commit/9bc28bf912fb0afdd14b36b0ccbafb185a32546a) Cleanup whitespace. (@mikeal) +- [9a35cd2](https://github.com/mikeal/request/commit/9a35cd2248d9492b099c7ee46d68ca017b6a701c) Fix basic auth for passwords that contain colons (@tonistiigi) +- [f724810](https://github.com/mikeal/request/commit/f724810c7b9f82fa1423d0a4d19fcb5aaca98137) Honor the .strictSSL option when using proxies (tunnel-agent) (@jhs) +- [95a2558](https://github.com/mikeal/request/commit/95a25580375be1b9c39cc2e88a36a8387395bc13) Add HTTP Signature support. (@davidlehn) +- [921c973](https://github.com/mikeal/request/commit/921c973015721ee0f92ed670f5e88bca057104cc) * Make password optional to support the format: http://username@hostname/ +- [2759ebb](https://github.com/mikeal/request/commit/2759ebbe07e8563fd3ded698d2236309fb28176b) add 'localAddress' support (@yyfrankyy) +- [#513](https://github.com/mikeal/request/pull/513) add 'localAddress' support (@yyfrankyy) +- [#512](https://github.com/mikeal/request/pull/512) Make password optional to support the format: http://username@hostname/ (@pajato1) +- [#508](https://github.com/mikeal/request/pull/508) Honor the .strictSSL option when using proxies (tunnel-agent) (@iriscouch) +- [5f036e6](https://github.com/mikeal/request/commit/5f036e6f5d3102a89e5401a53090a0627a7850a8) Conflicts: index.js (@nylen) +- [89d2602](https://github.com/mikeal/request/commit/89d2602ef4e3a4e6e51284f6a29b5767c79ffaba) Conflicts: README.md (@davidlehn) +- [#502](https://github.com/mikeal/request/pull/502) Fix POST (and probably other) requests that are retried after 401 Unauthorized (@nylen) +- [eb3e033](https://github.com/mikeal/request/commit/eb3e033170403832fe7070955db32112ec46005f) Merge branch 'master' of git://github.com/mikeal/request (@davidlehn) +- [#510](https://github.com/mikeal/request/pull/510) Add HTTP Signature support. (@digitalbazaar) +- [227d998](https://github.com/mikeal/request/commit/227d9985426214b6ac68702933346000298d7790) Update the internal path variable when querystring is changed (@jblebrun) +- [#519](https://github.com/mikeal/request/pull/519) Update internal path state on post-creation QS changes (@incredible-labs) +- [428b9c1](https://github.com/mikeal/request/commit/428b9c1ad9831b7dfd6cec4ce68df358590c6d65) Fixing test-tunnel.js (@noway421) +- [2417599](https://github.com/mikeal/request/commit/24175993f6c362f7fca5965feb0a11756f00baf3) Improving test-localAddress.js (@noway421) +- [#520](https://github.com/mikeal/request/pull/520) Fixing test-tunnel.js (@noway421) +- [1e37f1b](https://github.com/mikeal/request/commit/1e37f1bea45174e09e6450bc71dfc081c8cd94de) Some explaining comments (@noway421) +- [909b024](https://github.com/mikeal/request/commit/909b024619c9e47f615749661d610cccd8421d80) Updating dependencies (@noway421) +- [#523](https://github.com/mikeal/request/pull/523) Updating dependencies (@noway421) +- [47191e1](https://github.com/mikeal/request/commit/47191e1a5e29714fb0c5f8b2162b2971570df644) 2.17.0 (@mikeal) +- [14def5a](https://github.com/mikeal/request/commit/14def5af5903d03f66bd6c9be534e6b76f47c063) 2.18.0 (@mikeal) +- [56fd6b7](https://github.com/mikeal/request/commit/56fd6b7ec6da162894df0809126d688f30900d25) 2.18.1 (@mikeal) +- [37dd689](https://github.com/mikeal/request/commit/37dd68989670f8937b537579a4299d9649b8aa16) Fixing dep. (@mikeal) +- [dd7209a](https://github.com/mikeal/request/commit/dd7209a84dd40afe87db31c6ab66885e2015cb8f) 2.19.0 (@mikeal) +- [62f3b92](https://github.com/mikeal/request/commit/62f3b9203690d4ad34486fc506fc78a1c9971e03) 2.19.1 (@mikeal) +- [74c6b2e](https://github.com/mikeal/request/commit/74c6b2e315872980ee9a9a000d25e724138f28b1) Adding test for onelineproxy. (@mikeal) +- [2a01cc0](https://github.com/mikeal/request/commit/2a01cc082f544647f7176a992e02668519a694be) Fixing onelineproxy. (@mikeal) +- [8b4c920](https://github.com/mikeal/request/commit/8b4c9203adb372f2ee99b1b012406b482b27c68d) 2.20.0 (@mikeal) +- [d8d4a33](https://github.com/mikeal/request/commit/d8d4a3311d8d31df88fa8a2ab3265872e5cb97ae) 2.20.1 (@mikeal) +- [5937012](https://github.com/mikeal/request/commit/59370123b22e8c971e4ee48c3d0caf920d890bda) dependencies versions bump (@jodaka) +- [#529](https://github.com/mikeal/request/pull/529) dependencies versions bump (@jodaka) +- [#521](https://github.com/mikeal/request/pull/521) Improving test-localAddress.js (@noway421) +- [#503](https://github.com/mikeal/request/pull/503) Fix basic auth for passwords that contain colons (@tonistiigi) +- [#497](https://github.com/mikeal/request/pull/497) Added redirect event (@Cauldrath) +- [297a9ea](https://github.com/mikeal/request/commit/297a9ea827655e5fb406a86907bb0d89b01deae8) fix typo (@fredericosilva) +- [#532](https://github.com/mikeal/request/pull/532) fix typo (@fredericosilva) +- [3691db5](https://github.com/mikeal/request/commit/3691db5a2d0981d4aeabfda5b988a5c69074e187) Allow explicitly empty user field for basic authentication. (@mikeando) +- [#536](https://github.com/mikeal/request/pull/536) Allow explicitly empty user field for basic authentication. (@mikeando) +- [5d36e32](https://github.com/mikeal/request/commit/5d36e324047f79cbbf3bb9b71fef633f02b36367) 2.21.0 (@mikeal) +- [9bd98d6](https://github.com/mikeal/request/commit/9bd98d6052f222aa348635c1acb2e2c99eed0f8c) 2.21.1 (@mikeal) +- [a918e04](https://github.com/mikeal/request/commit/a918e04a8d767a2948567ea29ed3fdd1650c16b1) The exported request function doesn't have an auth method (@tschaub) +- [1ebe1ac](https://github.com/mikeal/request/commit/1ebe1ac2f78e8a6149c03ce68fcb23d56df2316e) exposing Request class (@regality) +- [#542](https://github.com/mikeal/request/pull/542) Expose Request class (@ifit) +- [467573d](https://github.com/mikeal/request/commit/467573d17b4db5f93ed425ace0594370a7820c7c) Update http-signatures version. (@davidlehn) +- [#541](https://github.com/mikeal/request/pull/541) The exported request function doesn't have an auth method (@tschaub) +- [3040bbe](https://github.com/mikeal/request/commit/3040bbe5de846811151dab8dc09944acc93a338e) Fix redirections, (@criloz) +- [#564](https://github.com/mikeal/request/pull/564) Fix redirections (@NebTex) +- [397b435](https://github.com/mikeal/request/commit/397b4350fcf885460d7dced94cf1db1f5c167f80) handle ciphers and secureOptions in agentOptions (@SamPlacette) +- [65a2778](https://github.com/mikeal/request/commit/65a27782db7d2798b6490ea08efacb8f3b0a401c) tests and fix for null agentOptions case (@SamPlacette) +- [#568](https://github.com/mikeal/request/pull/568) use agentOptions to create agent when specified in request (@SamPlacette) +- [c116920](https://github.com/mikeal/request/commit/c116920a2cbef25afe2e1bbcf4df074e1e2f9dbb) Let's see how we do with only the main guard. (@mikeal) +- [f54a335](https://github.com/mikeal/request/commit/f54a3358119298634a7b0c29a21bf1471fc23d98) Fix spelling of "ignoring." (@bigeasy) +- [5cd215f](https://github.com/mikeal/request/commit/5cd215f327e113dc6c062634e405c577986cfd3c) Change isUrl regex to accept mixed case (@lexander) +- [02c8e74](https://github.com/mikeal/request/commit/02c8e749360a47d45e3e7b51b7f751fe498d2f25) #583 added tests for isUrl regex change. (@lexander) +- [#581](https://github.com/mikeal/request/pull/581) Fix spelling of "ignoring." (@bigeasy) +- [#544](https://github.com/mikeal/request/pull/544) Update http-signature version. (@digitalbazaar) +- [e77746b](https://github.com/mikeal/request/commit/e77746bf42e974dc91a84d03f44f750dd7ee0989) global cookie jar disabled by default, send jar: true to enable. (@threepointone) +- [46015ac](https://github.com/mikeal/request/commit/46015ac8d5b74f8107a6ec9fd07c133f46c5d833) 2.22.0 (@mikeal) +- [e5da4a5](https://github.com/mikeal/request/commit/e5da4a5e1a20bf4f23681f7b996f22c5fadae91d) 2.22.1 (@mikeal) +- [#587](https://github.com/mikeal/request/pull/587) Global cookie jar disabled by default (@threepointone) +- [fac9da1](https://github.com/mikeal/request/commit/fac9da1cc426bf0a4bcc5f0b7d0d0aea8b1cce38) Prevent setting headers after they are sent (@wpreul) +- [#589](https://github.com/mikeal/request/pull/589) Prevent setting headers after they are sent (@wpreul) +- [bc1537a](https://github.com/mikeal/request/commit/bc1537ab79064cea532b0d14110ce4e49a663bde) Emit complete event when there is no callback +- [de8508e](https://github.com/mikeal/request/commit/de8508e9feac10563596aeee26727567b3c2e33c) Added check to see if the global pool is being used before using the global agent (@Cauldrath) +- [03441ef](https://github.com/mikeal/request/commit/03441ef919e51a742aaf9e168d917e97e2d9eb6b) 2.23.0 (@mikeal) diff --git a/deps/npm/node_modules/request/CONTRIBUTING.md b/deps/npm/node_modules/request/CONTRIBUTING.md new file mode 100644 index 0000000000..06367a1b0c --- /dev/null +++ b/deps/npm/node_modules/request/CONTRIBUTING.md @@ -0,0 +1,29 @@ +# This is an OPEN Open Source Project + +----------------------------------------- + +## What? + +Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. + +## Rules + +There are a few basic ground-rules for contributors: + +1. **No `--force` pushes** or modifying the Git history in any way. +1. **Non-master branches** ought to be used for ongoing work. +1. **External API changes and significant modifications** ought to be subject to an **internal pull-request** to solicit feedback from other contributors. +1. Internal pull-requests to solicit feedback are *encouraged* for any other non-trivial contribution but left to the discretion of the contributor. +1. For significant changes wait a full 24 hours before merging so that active contributors who are distributed throughout the world have a chance to weigh in. +1. Contributors should attempt to adhere to the prevailing code-style. + + +## Releases + +Declaring formal releases remains the prerogative of the project maintainer. + +## Changes to this arrangement + +This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change. + +----------------------------------------- diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md index b05695d2c9..1878fdfbb8 100644 --- a/deps/npm/node_modules/request/README.md +++ b/deps/npm/node_modules/request/README.md @@ -1,6 +1,6 @@ -# Request -- Simplified HTTP client +# Request — Simplified HTTP client -[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/) +[![NPM](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/) ## Super simple to use @@ -81,6 +81,106 @@ http.createServer(function (req, resp) { You can still use intermediate proxies, the requests will still follow HTTP forwards, etc. +## Proxies + +If you specify a `proxy` option, then the request (and any subsequent +redirects) will be sent via a connection to the proxy server. + +If your endpoint is an `https` url, and you are using a proxy, then +request will send a `CONNECT` request to the proxy server *first*, and +then use the supplied connection to connect to the endpoint. + +That is, first it will make a request like: + +``` +HTTP/1.1 CONNECT endpoint-server.com:80 +Host: proxy-server.com +User-Agent: whatever user agent you specify +``` + +and then the proxy server make a TCP connection to `endpoint-server` +on port `80`, and return a response that looks like: + +``` +HTTP/1.1 200 OK +``` + +At this point, the connection is left open, and the client is +communicating directly with the `endpoint-server.com` machine. + +See (the wikipedia page on HTTP +Tunneling)[http://en.wikipedia.org/wiki/HTTP_tunnel] for more +information. + +By default, when proxying `http` traffic, request will simply make a +standard proxied `http` request. This is done by making the `url` +section of the initial line of the request a fully qualified url to +the endpoint. + +For example, it will make a single request that looks like: + +``` +HTTP/1.1 GET http://endpoint-server.com/some-url +Host: proxy-server.com +Other-Headers: all go here + +request body or whatever +``` + +Because a pure "http over http" tunnel offers no additional security +or other features, it is generally simpler to go with a +straightforward HTTP proxy in this case. However, if you would like +to force a tunneling proxy, you may set the `tunnel` option to `true`. + +If you are using a tunneling proxy, you may set the +`proxyHeaderWhiteList` to share certain headers with the proxy. + +By default, this set is: + +``` +accept +accept-charset +accept-encoding +accept-language +accept-ranges +cache-control +content-encoding +content-language +content-length +content-location +content-md5 +content-range +content-type +connection +date +expect +max-forwards +pragma +proxy-authorization +referer +te +transfer-encoding +user-agent +via +``` + +Note that, when using a tunneling proxy, the `proxy-authorization` +header is *never* sent to the endpoint server, but only to the proxy +server. All other headers are sent as-is over the established +connection. + +## UNIX Socket + +`request` supports the `unix://` protocol for all requests. The path is assumed to be absolute to the root of the host file system. + +HTTP paths are extracted from the supplied URL by testing each level of the full URL against net.connect for a socket response. + +Thus the following request will GET `/httppath` from the HTTP server listening on `/tmp/unix.socket` + +```javascript +request.get('unix://tmp/unix.socket/httppath') +``` + ## Forms `request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API. @@ -96,12 +196,20 @@ request.post('http://service.com/upload').form({key:'value'}) For `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you. ```javascript -var r = request.post('http://service.com/upload') +var r = request.post('http://service.com/upload', function optionalCallback (err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}) var form = r.form() form.append('my_field', 'my_value') form.append('my_buffer', new Buffer([1, 2, 3])) -form.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png')) +form.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))) form.append('remote_file', request('http://google.com/doodle.png')) + +// Just like always, `r` is a writable stream, and can be used as such (you have until nextTick to pipe it, etc.) +// Alternatively, you can provide a callback (that's what this example does — see `optionalCallback` above). ``` ## HTTP Authentication @@ -116,14 +224,37 @@ request.get('http://some.server.com/', { 'sendImmediately': false } }); +// or +request.get('http://some.server.com/').auth(null, null, true, 'bearerToken'); +// or +request.get('http://some.server.com/', { + 'auth': { + 'bearer': 'bearerToken' + } +}); ``` -If passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`. +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)`. `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). +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. + +```javascript +var username = 'username', + password = 'password', + url = 'http://' + username + ':' + password + '@some.server.com'; + +request({url: url}, function (error, response, body) { + // Do more stuff with 'body' here +}); +``` + 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. + ## OAuth Signing ```javascript @@ -158,7 +289,7 @@ request.post({url:url, oauth:oauth}, function (e, r, body) { , token: perm_token.oauth_token , token_secret: perm_token.oauth_token_secret } - , url = 'https://api.twitter.com/1/users/show.json?' + , url = 'https://api.twitter.com/1.1/users/show.json?' , params = { screen_name: perm_token.screen_name , user_id: perm_token.user_id @@ -172,14 +303,14 @@ request.post({url:url, oauth:oauth}, function (e, r, body) { }) ``` -### Custom HTTP Headers +## Custom HTTP Headers HTTP Headers, such as `User-Agent`, can be set in the `options` object. In the example below, we call the github API to find out the number of stars and forks for the request repository. This requires a custom `User-Agent` header as well as https. -``` +```javascript var request = require('request'); var options = { @@ -200,7 +331,7 @@ function callback(error, response, body) { request(options, callback); ``` -### request(options, callback) +## request(options, callback) The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional. @@ -209,11 +340,11 @@ The first argument can be either a `url` or an `options` object. The only requir * `method` - http method (default: `"GET"`) * `headers` - http headers (default: `{}`) * `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`. -* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request). -* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above. +* `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request). +* `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. * `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below. -* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`) +* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise. * `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`) * `maxRedirects` - the maximum number of redirects to follow (default: `10`) * `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. @@ -224,17 +355,24 @@ The first argument can be either a `url` or an `options` object. The only requir * `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above. * `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). * `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option. -* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section) +* `jar` - If `true` and `tough-cookie` is installed, remember cookies for future use (or define your custom cookie jar; see examples section) * `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services) * `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. * `localAddress` - Local interface to bind for network connections. +* `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. +* `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. +* `proxyHeaderWhiteList` - A whitelist of headers to send to a + tunneling proxy. The callback argument gets 3 arguments: -1. An `error` when applicable (usually from the `http.Client` option, not the `http.ClientRequest` object) -2. An `http.ClientResponse` object -3. The third is the `response` body (`String` or `Buffer`) +1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object) +2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object +3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied) ## Convenience methods @@ -244,6 +382,22 @@ There are also shorthand methods for different HTTP METHODs and some other conve This method returns a wrapper around the normal request API that defaults to whatever options you pass in to it. +**Note:** You can call `.defaults()` on the wrapper that is returned from `request.defaults` to add/override defaults that were previously defaulted. + +For example: +```javascript +//requests using baseRequest() will set the 'x-token' header +var baseRequest = request.defaults({ + headers: {x-token: 'my-token'} +}) + +//requests using specialRequest() will include the 'x-token' header set in +//baseRequest and will also include the 'special' header +var specialRequest = baseRequest.defaults({ + headers: {special: 'special value'} +}) +``` + ### request.put Same as `request()`, but defaults to `method: "PUT"`. @@ -334,7 +488,7 @@ request.jar() ) ``` -Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`). +Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`) and install `tough-cookie`. ```javascript var request = request.defaults({jar: true}) @@ -343,7 +497,7 @@ request('http://www.google.com', function () { }) ``` -To use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`) +To use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`) ```javascript var j = request.jar() @@ -352,13 +506,39 @@ request('http://www.google.com', function () { request('http://images.google.com') }) ``` + OR ```javascript +// `npm install --save tough-cookie` before this works var j = request.jar() var cookie = request.cookie('your_cookie_here') -j.add(cookie) +j.setCookie(cookie, uri); request({url: 'http://www.google.com', jar: j}, function () { request('http://images.google.com') }) ``` + +To inspect your cookie jar after a request + +```javascript +var j = request.jar() +request({url: 'http://www.google.com', jar: j}, function () { + var cookie_string = j.getCookieString(uri); // "key1=value1; key2=value2; ..." + var cookies = j.getCookies(uri); + // [{key: 'key1', value: 'value1', domain: "www.google.com", ...}, ...] +}) +``` + +## Debugging + +There are at least three ways to debug the operation of `request`: + +1. Launch the node process like `NODE_DEBUG=request node script.js` + (`lib,request,otherlib` works too). + +2. Set `require('request').debug = true` at any time (this does the same thing + as #1). + +3. Use the [request-debug module](https://github.com/nylen/request-debug) to + view request and response headers and bodies. diff --git a/deps/npm/node_modules/request/disabled.appveyor.yml b/deps/npm/node_modules/request/disabled.appveyor.yml new file mode 100644 index 0000000000..238f3d695e --- /dev/null +++ b/deps/npm/node_modules/request/disabled.appveyor.yml @@ -0,0 +1,36 @@ +# http://www.appveyor.com/docs/appveyor-yml + +# Fix line endings in Windows. (runs before repo cloning) +init: + - git config --global core.autocrlf input + +# Test against these versions of Node.js. +environment: + matrix: + - nodejs_version: "0.10" + - nodejs_version: "0.8" + - nodejs_version: "0.11" + +# Allow failing jobs for bleeding-edge Node.js versions. +matrix: + allow_failures: + - nodejs_version: "0.11" + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node 0.STABLE.latest + - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) + # Typical npm stuff. + - npm install + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - ps: "npm test # PowerShell" # Pass comment to PS for easier debugging + - cmd: npm test + +# Don't actually build. +build: off + +# Set build version format here instead of in the admin panel. +version: "{build}" diff --git a/deps/npm/node_modules/request/index.js b/deps/npm/node_modules/request/index.js index 465e5ae3b6..8e8a133e24 100755 --- a/deps/npm/node_modules/request/index.js +++ b/deps/npm/node_modules/request/index.js @@ -12,146 +12,155 @@ // See the License for the specific language governing permissions and // limitations under the License. -var optional = require('./lib/optional') - , cookie = optional('tough-cookie') - , Cookie = cookie && cookie.Cookie - , CookieJar = cookie && cookie.CookieJar - , cookieJar = CookieJar && new CookieJar - - , copy = require('./lib/copy') - , Request = require('./request') +var extend = require('util')._extend + , cookies = require('./lib/cookies') + , copy = require('./lib/copy') + , helpers = require('./lib/helpers') + , isFunction = helpers.isFunction + , constructObject = helpers.constructObject + , filterForCallback = helpers.filterForCallback + , constructOptionsFrom = helpers.constructOptionsFrom + , paramsHaveRequestBody = helpers.paramsHaveRequestBody ; - - // organize params for patch, post, put, head, del function initParams(uri, options, callback) { - if ((typeof options === 'function') && !callback) callback = options - if (options && typeof options === 'object') { - options.uri = uri - } else if (typeof uri === 'string') { - options = {uri:uri} - } else { - options = uri - uri = options.uri - } - return { uri: uri, options: options, callback: callback } + callback = filterForCallback([options, callback]) + options = constructOptionsFrom(uri, options) + + return constructObject() + .extend({callback: callback}) + .extend({options: options}) + .extend({uri: options.uri}) + .done() } function request (uri, options, callback) { - if (typeof uri === 'undefined') throw new Error('undefined is not a valid uri or options object.') - if ((typeof options === 'function') && !callback) callback = options - if (options && typeof options === 'object') { - options.uri = uri - } else if (typeof uri === 'string') { - options = {uri:uri} - } else { - options = uri - } + if (typeof uri === 'undefined') + throw new Error('undefined is not a valid uri or options object.') - options = copy(options) + var params = initParams(uri, options, callback) + options = params.options + options.callback = params.callback + options.uri = params.uri - if (callback) options.callback = callback - var r = new Request(options) - return r -} - -module.exports = request - -request.Request = Request; - -request.debug = process.env.NODE_DEBUG && /request/.test(process.env.NODE_DEBUG) - -request.initParams = initParams - -request.defaults = function (options, requester) { - var def = function (method) { - var d = function (uri, opts, callback) { - var params = initParams(uri, opts, callback) - for (var i in options) { - if (params.options[i] === undefined) params.options[i] = options[i] - } - if(typeof requester === 'function') { - if(method === request) { - method = requester - } else { - params.options._requester = requester - } - } - return method(params.options, params.callback) - } - return d - } - var de = def(request) - de.get = def(request.get) - de.patch = def(request.patch) - de.post = def(request.post) - de.put = def(request.put) - de.head = def(request.head) - de.del = def(request.del) - de.cookie = def(request.cookie) - de.jar = request.jar - return de + return new request.Request(options) } function requester(params) { - if(typeof params.options._requester === 'function') { + if(typeof params.options._requester === 'function') return params.options._requester - } else { - return request - } + return request } -request.forever = function (agentOptions, optionsArg) { - var options = {} - if (optionsArg) { - for (var option in optionsArg) { - options[option] = optionsArg[option] - } - } - if (agentOptions) options.agentOptions = agentOptions - options.forever = true - return request.defaults(options) +request.get = function (uri, options, callback) { + var params = initParams(uri, options, callback) + params.options.method = 'GET' + return requester(params)(params.uri || null, params.options, params.callback) +} + +request.head = function (uri, options, callback) { + var params = initParams(uri, options, callback) + params.options.method = 'HEAD' + + if (paramsHaveRequestBody(params)) + throw new Error("HTTP HEAD requests MUST NOT include a request body.") + + return requester(params)(params.uri || null, params.options, params.callback) } -request.get = request request.post = function (uri, options, callback) { var params = initParams(uri, options, callback) params.options.method = 'POST' return requester(params)(params.uri || null, params.options, params.callback) } + request.put = function (uri, options, callback) { var params = initParams(uri, options, callback) params.options.method = 'PUT' return requester(params)(params.uri || null, params.options, params.callback) } + request.patch = function (uri, options, callback) { var params = initParams(uri, options, callback) params.options.method = 'PATCH' return requester(params)(params.uri || null, params.options, params.callback) } -request.head = function (uri, options, callback) { - var params = initParams(uri, options, callback) - params.options.method = 'HEAD' - if (params.options.body || - params.options.requestBodyStream || - (params.options.json && typeof params.options.json !== 'boolean') || - params.options.multipart) { - throw new Error("HTTP HEAD requests MUST NOT include a request body.") - } - return requester(params)(params.uri || null, params.options, params.callback) -} request.del = function (uri, options, callback) { var params = initParams(uri, options, callback) params.options.method = 'DELETE' return requester(params)(params.uri || null, params.options, params.callback) } + request.jar = function () { - return new CookieJar + return cookies.jar() } + request.cookie = function (str) { - if (str && str.uri) str = str.uri - if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param") - return new Cookie(str) + return cookies.parse(str) +} + +request.defaults = function (options, requester) { + + var wrap = function (method) { + var headerlessOptions = function (options) { + options = extend({}, options) + delete options.headers + return options + } + + var getHeaders = function (params, options) { + return constructObject() + .extend(options.headers) + .extend(params.options.headers) + .done() + } + + return function (uri, opts, callback) { + var params = initParams(uri, opts, callback) + params.options = extend(params.options, headerlessOptions(options)) + + if (options.headers) + params.options.headers = getHeaders(params, options) + + if (isFunction(requester)) { + if (method === request) { + method = requester + } else { + params.options._requester = requester + } + } + + return method(params.options, params.callback) + } + } + + defaults = wrap(this) + defaults.get = wrap(this.get) + defaults.patch = wrap(this.patch) + defaults.post = wrap(this.post) + defaults.put = wrap(this.put) + defaults.head = wrap(this.head) + defaults.del = wrap(this.del) + defaults.cookie = wrap(this.cookie) + defaults.jar = this.jar + defaults.defaults = this.defaults + return defaults +} + +request.forever = function (agentOptions, optionsArg) { + var options = constructObject() + if (optionsArg) options.extend(optionsArg) + if (agentOptions) options.agentOptions = agentOptions + + options.extend({forever: true}) + return request.defaults(options.done()) } + +// Exports + +module.exports = request +request.Request = require('./request') +request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG) +request.initParams = initParams diff --git a/deps/npm/node_modules/request/lib/cookies.js b/deps/npm/node_modules/request/lib/cookies.js new file mode 100644 index 0000000000..7e61c62bcd --- /dev/null +++ b/deps/npm/node_modules/request/lib/cookies.js @@ -0,0 +1,40 @@ +var optional = require('./optional') + , tough = optional('tough-cookie') + , Cookie = tough && tough.Cookie + , CookieJar = tough && tough.CookieJar + ; + +exports.parse = function(str) { + if (str && str.uri) str = str.uri + if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param") + if (!Cookie) { + return null; + } + return Cookie.parse(str) +}; + +// Adapt the sometimes-Async api of tough.CookieJar to our requirements +function RequestJar() { + this._jar = new CookieJar(); +} +RequestJar.prototype.setCookie = function(cookieOrStr, uri, options) { + return this._jar.setCookieSync(cookieOrStr, uri, options || {}); +}; +RequestJar.prototype.getCookieString = function(uri) { + return this._jar.getCookieStringSync(uri); +}; +RequestJar.prototype.getCookies = function(uri) { + return this._jar.getCookiesSync(uri); +}; + +exports.jar = function() { + if (!CookieJar) { + // tough-cookie not loaded, return a stub object: + return { + setCookie: function(){}, + getCookieString: function(){}, + getCookies: function(){} + }; + } + return new RequestJar(); +}; diff --git a/deps/npm/node_modules/request/lib/debug.js b/deps/npm/node_modules/request/lib/debug.js index fa27b24b65..d61ec88d7f 100644 --- a/deps/npm/node_modules/request/lib/debug.js +++ b/deps/npm/node_modules/request/lib/debug.js @@ -1,7 +1,9 @@ var util = require('util') + , request = require('../index') + ; -module.exports = -function debug () { - if (/\brequest\b/.test(process.env.NODE_DEBUG)) +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/getSafe.js b/deps/npm/node_modules/request/lib/getSafe.js deleted file mode 100644 index 28e07ea561..0000000000 --- a/deps/npm/node_modules/request/lib/getSafe.js +++ /dev/null @@ -1,34 +0,0 @@ -// Safe toJSON -module.exports = -function getSafe (self, uuid) { - if (typeof self === 'object' || typeof self === 'function') var safe = {} - if (Array.isArray(self)) var safe = [] - - var recurse = [] - - Object.defineProperty(self, uuid, {}) - - var attrs = Object.keys(self).filter(function (i) { - if (i === uuid) return false - if ( (typeof self[i] !== 'object' && typeof self[i] !== 'function') || self[i] === null) return true - return !(Object.getOwnPropertyDescriptor(self[i], uuid)) - }) - - - for (var i=0;inew BufferList([ callback ]) + * bl.length + * bl.append(buffer) + * bl.get(index) + * bl.slice([ start[, end ] ]) + * bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) + * bl.duplicate() + * bl.consume(bytes) + * bl.toString([encoding, [ start, [ end ]]]) + * bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() + * Streams + +-------------------------------------------------------- + +### new BufferList([ callback | buffer | buffer array ]) +The constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream. + +Normally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object. + +`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with: + +```js +var bl = require('bl') +var myinstance = bl() + +// equivilant to: + +var BufferList = require('bl') +var myinstance = new BufferList() +``` + +-------------------------------------------------------- + +### bl.length +Get the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list. + +-------------------------------------------------------- + +### bl.append(buffer) +`append(buffer)` adds an additional buffer or BufferList to the internal list. + +-------------------------------------------------------- + +### bl.get(index) +`get()` will return the byte at the specified index. + +-------------------------------------------------------- + +### bl.slice([ start, [ end ] ]) +`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively. + +If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer. + +-------------------------------------------------------- + +### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) +`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively. + +-------------------------------------------------------- + +### bl.duplicate() +`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example: + +```js +var bl = new BufferList() + +bl.append('hello') +bl.append(' world') +bl.append('\n') + +bl.duplicate().pipe(process.stdout, { end: false }) + +console.log(bl.toString()) +``` + +-------------------------------------------------------- + +### bl.consume(bytes) +`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers—initial offsets will be calculated accordingly in order to give you a consistent view of the data. + +-------------------------------------------------------- + +### bl.toString([encoding, [ start, [ end ]]]) +`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information. + +-------------------------------------------------------- + +### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() + +All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently. + +See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work. + +-------------------------------------------------------- + +### Streams +**bl** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **bl** instance. + +-------------------------------------------------------- + +## Contributors + +**bl** is brought to you by the following hackers: + + * [Rod Vagg](https://github.com/rvagg) + * [Matteo Collina](https://github.com/mcollina) + +======= + +## License + +**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 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 new file mode 100644 index 0000000000..d1ea3b5c2e --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/bl.js @@ -0,0 +1,216 @@ +var DuplexStream = require('readable-stream').Duplex + , util = require('util') + +function BufferList (callback) { + if (!(this instanceof BufferList)) + return new BufferList(callback) + + this._bufs = [] + this.length = 0 + + if (typeof callback == 'function') { + this._callback = callback + + var piper = function (err) { + if (this._callback) { + this._callback(err) + this._callback = null + } + }.bind(this) + + this.on('pipe', function (src) { + src.on('error', piper) + }) + this.on('unpipe', function (src) { + src.removeListener('error', piper) + }) + } + else if (Buffer.isBuffer(callback)) + this.append(callback) + else if (Array.isArray(callback)) { + callback.forEach(function (b) { + Buffer.isBuffer(b) && this.append(b) + }.bind(this)) + } + + DuplexStream.call(this) +} + +util.inherits(BufferList, DuplexStream) + +BufferList.prototype._offset = function (offset) { + var tot = 0, i = 0, _t + for (; i < this._bufs.length; i++) { + _t = tot + this._bufs[i].length + if (offset < _t) + return [ i, offset - tot ] + tot = _t + } +} + +BufferList.prototype.append = function (buf) { + var isBuffer = Buffer.isBuffer(buf) || + buf instanceof BufferList + + this._bufs.push(isBuffer ? buf : new Buffer(buf)) + this.length += buf.length + return this +} + +BufferList.prototype._write = function (buf, encoding, callback) { + this.append(buf) + if (callback) + callback() +} + +BufferList.prototype._read = function (size) { + if (!this.length) + return this.push(null) + size = Math.min(size, this.length) + this.push(this.slice(0, size)) + this.consume(size) +} + +BufferList.prototype.end = function (chunk) { + DuplexStream.prototype.end.call(this, chunk) + + if (this._callback) { + this._callback(null, this.slice()) + this._callback = null + } +} + +BufferList.prototype.get = function (index) { + return this.slice(index, index + 1)[0] +} + +BufferList.prototype.slice = function (start, end) { + return this.copy(null, 0, start, end) +} + +BufferList.prototype.copy = function (dst, dstStart, srcStart, srcEnd) { + if (typeof srcStart != 'number' || srcStart < 0) + srcStart = 0 + if (typeof srcEnd != 'number' || srcEnd > this.length) + srcEnd = this.length + if (srcStart >= this.length) + return dst || new Buffer(0) + if (srcEnd <= 0) + return dst || new Buffer(0) + + var copy = !!dst + , off = this._offset(srcStart) + , len = srcEnd - srcStart + , bytes = len + , bufoff = (copy && dstStart) || 0 + , start = off[1] + , l + , i + + // copy/slice everything + if (srcStart === 0 && srcEnd == this.length) { + if (!copy) // slice, just return a full concat + return Buffer.concat(this._bufs) + + // copy, need to copy individual buffers + for (i = 0; i < this._bufs.length; i++) { + this._bufs[i].copy(dst, bufoff) + bufoff += this._bufs[i].length + } + + return dst + } + + // easy, cheap case where it's a subset of one of the buffers + if (bytes <= this._bufs[off[0]].length - start) { + return copy + ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) + : this._bufs[off[0]].slice(start, start + bytes) + } + + if (!copy) // a slice, we need something to copy in to + dst = new Buffer(len) + + for (i = off[0]; i < this._bufs.length; i++) { + l = this._bufs[i].length - start + + if (bytes > l) { + this._bufs[i].copy(dst, bufoff, start) + } else { + this._bufs[i].copy(dst, bufoff, start, start + bytes) + break + } + + bufoff += l + bytes -= l + + if (start) + start = 0 + } + + return dst +} + +BufferList.prototype.toString = function (encoding, start, end) { + return this.slice(start, end).toString(encoding) +} + +BufferList.prototype.consume = function (bytes) { + while (this._bufs.length) { + if (bytes > this._bufs[0].length) { + bytes -= this._bufs[0].length + this.length -= this._bufs[0].length + this._bufs.shift() + } else { + this._bufs[0] = this._bufs[0].slice(bytes) + this.length -= bytes + break + } + } + return this +} + +BufferList.prototype.duplicate = function () { + var i = 0 + , copy = new BufferList() + + for (; i < this._bufs.length; i++) + copy.append(this._bufs[i]) + + return copy +} + +BufferList.prototype.destroy = function () { + this._bufs.length = 0; + this.length = 0; + this.push(null); +} + +;(function () { + var methods = { + 'readDoubleBE' : 8 + , 'readDoubleLE' : 8 + , 'readFloatBE' : 4 + , 'readFloatLE' : 4 + , 'readInt32BE' : 4 + , 'readInt32LE' : 4 + , 'readUInt32BE' : 4 + , 'readUInt32LE' : 4 + , 'readInt16BE' : 2 + , 'readInt16LE' : 2 + , 'readUInt16BE' : 2 + , 'readUInt16LE' : 2 + , 'readInt8' : 1 + , 'readUInt8' : 1 + } + + for (var m in methods) { + (function (m) { + BufferList.prototype[m] = function (offset) { + return this.slice(offset, offset + methods[m])[m](0) + } + }(m)) + } +}()) + +module.exports = BufferList diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore new file mode 100644 index 0000000000..38344f87a6 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/.npmignore @@ -0,0 +1,5 @@ +build/ +test/ +examples/ +fs.js +zlib.js \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE new file mode 100644 index 0000000000..0c44ae716d --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/README.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/README.md new file mode 100644 index 0000000000..34c1189792 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/README.md @@ -0,0 +1,15 @@ +# readable-stream + +***Node-core streams for userland*** + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png)](https://nodei.co/npm/readable-stream/) + +This package is a mirror of the Streams2 and Streams3 implementations in Node-core. + +If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. + +**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. + +**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` + diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js new file mode 100644 index 0000000000..ca807af876 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_duplex.js") diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 0000000000..b513d61a96 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,89 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +module.exports = Duplex; + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +} +/**/ + + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +forEach(objectKeys(Writable.prototype), function(method) { + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; +}); + +function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) + this.readable = false; + + if (options && options.writable === false) + this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) + return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(this.end.bind(this)); +} + +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 0000000000..895ca50a1d --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,46 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); +}; diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 0000000000..630722099e --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,982 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + + +/**/ +var Buffer = require('buffer').Buffer; +/**/ + +Readable.ReadableState = ReadableState; + +var EE = require('events').EventEmitter; + +/**/ +if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +var Stream = require('stream'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var StringDecoder; + +util.inherits(Readable, Stream); + +function ReadableState(options, stream) { + options = options || {}; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = false; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // In streams that never have any data, and do push(null) right away, + // the consumer can miss the 'end' event if they do some I/O before + // consuming the stream. So, we don't emit('end') until some reading + // happens. + this.calledRead = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + if (!(this instanceof Readable)) + return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + + if (typeof chunk === 'string' && !state.objectMode) { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = new Buffer(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function(chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null || chunk === undefined) { + state.reading = false; + if (!state.ended) + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var e = new Error('stream.unshift() after end event'); + stream.emit('error', e); + } else { + if (state.decoder && !addToFront && !encoding) + chunk = state.decoder.write(chunk); + + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) { + state.buffer.unshift(chunk); + } else { + state.reading = false; + state.buffer.push(chunk); + } + + if (state.needReadable) + emitReadable(stream); + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + + + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && + (state.needReadable || + state.length < state.highWaterMark || + state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; +}; + +// Don't raise the hwm > 128MB +var MAX_HWM = 0x800000; +function roundUpToNextPowerOf2(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n++; + } + return n; +} + +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) + return 0; + + if (state.objectMode) + return n === 0 ? 0 : 1; + + if (n === null || isNaN(n)) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) + return state.buffer[0].length; + else + return state.length; + } + + if (n <= 0) + return 0; + + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) + state.highWaterMark = roundUpToNextPowerOf2(n); + + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else + return state.length; + } + + return n; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function(n) { + var state = this._readableState; + state.calledRead = true; + var nOrig = n; + var ret; + + if (typeof n !== 'number' || n > 0) + state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && + state.needReadable && + (state.length >= state.highWaterMark || state.ended)) { + emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + ret = null; + + // In cases where the decoder did not receive enough data + // to produce a full chunk, then immediately received an + // EOF, state.buffer will contain [, ]. + // howMuchToRead will see this and coerce the amount to + // read to zero (because it's looking at the length of the + // first in state.buffer), and we'll end up here. + // + // This can only happen via state.decoder -- no other venue + // exists for pushing a zero-length chunk into state.buffer + // and triggering this behavior. In this case, we return our + // remaining data and end the stream, if appropriate. + if (state.length > 0 && state.decoder) { + ret = fromList(n, state); + state.length -= ret.length; + } + + if (state.length === 0) + endReadable(this); + + return ret; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + + // if we currently have less than the highWaterMark, then also read some + if (state.length - n <= state.highWaterMark) + doRead = true; + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) + doRead = false; + + if (doRead) { + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) + state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + } + + // If _read called its callback synchronously, then `reading` + // will be false, and we need to re-evaluate how much data we + // can return to the user. + if (doRead && !state.reading) + n = howMuchToRead(nOrig, state); + + if (n > 0) + ret = fromList(n, state); + else + ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } + + state.length -= n; + + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) + state.needReadable = true; + + // If we happened to read() exactly the remaining amount in the + // buffer, and the EOF has been seen at this point, then make sure + // that we emit 'end' on the very next tick. + if (state.ended && !state.endEmitted && state.length === 0) + endReadable(this); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + + +function onEofChunk(stream, state) { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // if we've ended and we have some data left, then emit + // 'readable' now to make sure it gets picked up. + if (state.length > 0) + emitReadable(stream); + else + endReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (state.emittedReadable) + return; + + state.emittedReadable = true; + if (state.sync) + process.nextTick(function() { + emitReadable_(stream); + }); + else + emitReadable_(stream); +} + +function emitReadable_(stream) { + stream.emit('readable'); +} + + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(function() { + maybeReadMore_(stream, state); + }); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && + state.length < state.highWaterMark) { + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + else + len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function(n) { + this.emit('error', new Error('not implemented')); +}; + +Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && + dest !== process.stdout && + dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) + process.nextTick(endFn); + else + src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + if (readable !== src) return; + cleanup(); + } + + function onend() { + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + function cleanup() { + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (!dest._writableState || dest._writableState.needDrain) + ondrain(); + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + unpipe(); + dest.removeListener('error', onerror); + if (EE.listenerCount(dest, 'error') === 0) + dest.emit('error', er); + } + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. + if (!dest._events || !dest._events.error) + dest.on('error', onerror); + else if (isArray(dest._events.error)) + dest._events.error.unshift(onerror); + else + dest._events.error = [onerror, dest._events.error]; + + + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + // the handler that waits for readable events after all + // the data gets sucked out in flow. + // This would be easier to follow with a .once() handler + // in flow(), but that is too slow. + this.on('readable', pipeOnReadable); + + state.flowing = true; + process.nextTick(function() { + flow(src); + }); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function() { + var dest = this; + var state = src._readableState; + state.awaitDrain--; + if (state.awaitDrain === 0) + flow(src); + }; +} + +function flow(src) { + var state = src._readableState; + var chunk; + state.awaitDrain = 0; + + function write(dest, i, list) { + var written = dest.write(chunk); + if (false === written) { + state.awaitDrain++; + } + } + + while (state.pipesCount && null !== (chunk = src.read())) { + + if (state.pipesCount === 1) + write(state.pipes, 0, null); + else + forEach(state.pipes, write); + + src.emit('data', chunk); + + // if anyone needs a drain, then we have to wait for that. + if (state.awaitDrain > 0) + return; + } + + // if every destination was unpiped, either before entering this + // function, or in the while loop, then stop flowing. + // + // NB: This is a pretty rare edge case. + if (state.pipesCount === 0) { + state.flowing = false; + + // if there were data event listeners added, then switch to old mode. + if (EE.listenerCount(src, 'data') > 0) + emitDataEvents(src); + return; + } + + // at this point, no one needed a drain, so we just ran out of data + // on the next readable event, start it over again. + state.ranOut = true; +} + +function pipeOnReadable() { + if (this._readableState.ranOut) { + this._readableState.ranOut = false; + flow(this); + } +} + + +Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) + return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) + return this; + + if (!dest) + dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + if (dest) + dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + + for (var i = 0; i < len; i++) + dests[i].emit('unpipe', this); + return this; + } + + // try to find the right one. + var i = indexOf(state.pipes, dest); + if (i === -1) + return this; + + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data' && !this._readableState.flowing) + emitDataEvents(this); + + if (ev === 'readable' && this.readable) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + this.read(0); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function() { + emitDataEvents(this); + this.read(0); + this.emit('resume'); +}; + +Readable.prototype.pause = function() { + emitDataEvents(this, true); + this.emit('pause'); +}; + +function emitDataEvents(stream, startPaused) { + var state = stream._readableState; + + if (state.flowing) { + // https://github.com/isaacs/readable-stream/issues/16 + throw new Error('Cannot switch to old mode now.'); + } + + var paused = startPaused || false; + var readable = false; + + // convert to an old-style stream. + stream.readable = true; + stream.pipe = Stream.prototype.pipe; + stream.on = stream.addListener = Stream.prototype.on; + + stream.on('readable', function() { + readable = true; + + var c; + while (!paused && (null !== (c = stream.read()))) + stream.emit('data', c); + + if (c === null) { + readable = false; + stream._readableState.needReadable = true; + } + }); + + stream.pause = function() { + paused = true; + this.emit('pause'); + }; + + stream.resume = function() { + paused = false; + if (readable) + process.nextTick(function() { + stream.emit('readable'); + }); + else + this.read(0); + this.emit('resume'); + }; + + // now make it start, just in case it hadn't already. + stream.emit('readable'); +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function(stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function() { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function(chunk) { + if (state.decoder) + chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + //if (state.objectMode && util.isNullOrUndefined(chunk)) + if (state.objectMode && (chunk === null || chunk === undefined)) + return; + else if (!state.objectMode && (!chunk || !chunk.length)) + return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (typeof stream[i] === 'function' && + typeof this[i] === 'undefined') { + this[i] = function(method) { return function() { + return stream[method].apply(stream, arguments); + }}(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + forEach(events, function(ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function(n) { + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + + + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; + + // nothing in the list, definitely empty. + if (list.length === 0) + return null; + + if (length === 0) + ret = null; + else if (objectMode) + ret = list.shift(); + else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) + ret = list.join(''); + else + ret = Buffer.concat(list, length); + list.length = 0; + } else { + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) + ret = ''; + else + ret = new Buffer(n); + + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var buf = list[0]; + var cpy = Math.min(n - c, buf.length); + + if (stringMode) + ret += buf.slice(0, cpy); + else + buf.copy(ret, c, 0, cpy); + + if (cpy < buf.length) + list[0] = buf.slice(cpy); + else + list.shift(); + + c += cpy; + } + } + } + + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) + throw new Error('endReadable called on non-empty stream'); + + if (!state.endEmitted && state.calledRead) { + state.ended = true; + process.nextTick(function() { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } + }); + } +} + +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf (xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 0000000000..eb188df3e8 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,210 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + + +function TransformState(options, stream) { + this.afterTransform = function(er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) + return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (data !== null && data !== undefined) + stream.push(data); + + if (cb) + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + + +function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + + Duplex.call(this, options); + + var ts = this._transformState = new TransformState(options, this); + + // when the writable side finishes, then flush out anything remaining. + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + this.once('finish', function() { + if ('function' === typeof this._flush) + this._flush(function(er) { + done(stream, er); + }); + else + done(stream); + }); +} + +Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error('not implemented'); +}; + +Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || + rs.needReadable || + rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function(n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + + +function done(stream, er) { + if (er) + return stream.emit('error', er); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var rs = stream._readableState; + var ts = stream._transformState; + + if (ws.length) + throw new Error('calling transform done when ws.length != 0'); + + if (ts.transforming) + throw new Error('calling transform done when still transforming'); + + return stream.push(null); +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 0000000000..4bdaa4fa49 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,386 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, cb), and it'll handle all +// the drain event emission and buffering. + +module.exports = Writable; + +/**/ +var Buffer = require('buffer').Buffer; +/**/ + +Writable.WritableState = WritableState; + + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Stream = require('stream'); + +util.inherits(Writable, Stream); + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; +} + +function WritableState(options, stream) { + options = options || {}; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function(er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.buffer = []; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; +} + +function Writable(options) { + var Duplex = require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof Duplex)) + return new Writable(options); + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function() { + this.emit('error', new Error('Cannot pipe. Not readable.')); +}; + + +function writeAfterEnd(stream, state, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode) { + var er = new TypeError('Invalid non-string/buffer chunk'); + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); + valid = false; + } + return valid; +} + +Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; + else if (!encoding) + encoding = state.defaultEncoding; + + if (typeof cb !== 'function') + cb = function() {}; + + if (state.ended) + writeAfterEnd(this, state, cb); + else if (validChunk(this, state, chunk, cb)) + ret = writeOrBuffer(this, state, chunk, encoding, cb); + + return ret; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && + state.decodeStrings !== false && + typeof chunk === 'string') { + chunk = new Buffer(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) + state.needDrain = true; + + if (state.writing) + state.buffer.push(new WriteReq(chunk, encoding, cb)); + else + doWrite(stream, state, len, chunk, encoding, cb); + + return ret; +} + +function doWrite(stream, state, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + if (sync) + process.nextTick(function() { + cb(er); + }); + else + cb(er); + + stream._writableState.errorEmitted = true; + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) + onwriteError(stream, state, sync, er, cb); + else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(stream, state); + + if (!finished && !state.bufferProcessing && state.buffer.length) + clearBuffer(stream, state); + + if (sync) { + process.nextTick(function() { + afterWrite(stream, state, finished, cb); + }); + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + cb(); + if (finished) + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + + for (var c = 0; c < state.buffer.length; c++) { + var entry = state.buffer[c]; + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, len, chunk, encoding, cb); + + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + c++; + break; + } + } + + state.bufferProcessing = false; + if (c < state.buffer.length) + state.buffer = state.buffer.slice(c); + else + state.buffer.length = 0; +} + +Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error('not implemented')); +}; + +Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (typeof chunk !== 'undefined' && chunk !== null) + this.write(chunk, encoding); + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) + endWritable(this, state, cb); +}; + + +function needFinish(stream, state) { + return (state.ending && + state.length === 0 && + !state.finished && + !state.writing); +} + +function finishMaybe(stream, state) { + var need = needFinish(stream, state); + if (need) { + state.finished = true; + stream.emit('finish'); + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + process.nextTick(cb); + else + stream.once('finish', cb); + } + state.ended = true; +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md new file mode 100644 index 0000000000..5a76b4149c --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md @@ -0,0 +1,3 @@ +# core-util-is + +The `util.is*` functions introduced in Node v0.12. diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch new file mode 100644 index 0000000000..a06d5c05f7 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch @@ -0,0 +1,604 @@ +diff --git a/lib/util.js b/lib/util.js +index a03e874..9074e8e 100644 +--- a/lib/util.js ++++ b/lib/util.js +@@ -19,430 +19,6 @@ + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + +-var formatRegExp = /%[sdj%]/g; +-exports.format = function(f) { +- if (!isString(f)) { +- var objects = []; +- for (var i = 0; i < arguments.length; i++) { +- objects.push(inspect(arguments[i])); +- } +- return objects.join(' '); +- } +- +- var i = 1; +- var args = arguments; +- var len = args.length; +- var str = String(f).replace(formatRegExp, function(x) { +- if (x === '%%') return '%'; +- if (i >= len) return x; +- switch (x) { +- case '%s': return String(args[i++]); +- case '%d': return Number(args[i++]); +- case '%j': +- try { +- return JSON.stringify(args[i++]); +- } catch (_) { +- return '[Circular]'; +- } +- default: +- return x; +- } +- }); +- for (var x = args[i]; i < len; x = args[++i]) { +- if (isNull(x) || !isObject(x)) { +- str += ' ' + x; +- } else { +- str += ' ' + inspect(x); +- } +- } +- return str; +-}; +- +- +-// Mark that a method should not be used. +-// Returns a modified function which warns once by default. +-// If --no-deprecation is set, then it is a no-op. +-exports.deprecate = function(fn, msg) { +- // Allow for deprecating things in the process of starting up. +- if (isUndefined(global.process)) { +- return function() { +- return exports.deprecate(fn, msg).apply(this, arguments); +- }; +- } +- +- if (process.noDeprecation === true) { +- return fn; +- } +- +- var warned = false; +- function deprecated() { +- if (!warned) { +- if (process.throwDeprecation) { +- throw new Error(msg); +- } else if (process.traceDeprecation) { +- console.trace(msg); +- } else { +- console.error(msg); +- } +- warned = true; +- } +- return fn.apply(this, arguments); +- } +- +- return deprecated; +-}; +- +- +-var debugs = {}; +-var debugEnviron; +-exports.debuglog = function(set) { +- if (isUndefined(debugEnviron)) +- debugEnviron = process.env.NODE_DEBUG || ''; +- set = set.toUpperCase(); +- if (!debugs[set]) { +- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { +- var pid = process.pid; +- debugs[set] = function() { +- var msg = exports.format.apply(exports, arguments); +- console.error('%s %d: %s', set, pid, msg); +- }; +- } else { +- debugs[set] = function() {}; +- } +- } +- return debugs[set]; +-}; +- +- +-/** +- * Echos the value of a value. Trys to print the value out +- * in the best way possible given the different types. +- * +- * @param {Object} obj The object to print out. +- * @param {Object} opts Optional options object that alters the output. +- */ +-/* legacy: obj, showHidden, depth, colors*/ +-function inspect(obj, opts) { +- // default options +- var ctx = { +- seen: [], +- stylize: stylizeNoColor +- }; +- // legacy... +- if (arguments.length >= 3) ctx.depth = arguments[2]; +- if (arguments.length >= 4) ctx.colors = arguments[3]; +- if (isBoolean(opts)) { +- // legacy... +- ctx.showHidden = opts; +- } else if (opts) { +- // got an "options" object +- exports._extend(ctx, opts); +- } +- // set default options +- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; +- if (isUndefined(ctx.depth)) ctx.depth = 2; +- if (isUndefined(ctx.colors)) ctx.colors = false; +- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; +- if (ctx.colors) ctx.stylize = stylizeWithColor; +- return formatValue(ctx, obj, ctx.depth); +-} +-exports.inspect = inspect; +- +- +-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +-inspect.colors = { +- 'bold' : [1, 22], +- 'italic' : [3, 23], +- 'underline' : [4, 24], +- 'inverse' : [7, 27], +- 'white' : [37, 39], +- 'grey' : [90, 39], +- 'black' : [30, 39], +- 'blue' : [34, 39], +- 'cyan' : [36, 39], +- 'green' : [32, 39], +- 'magenta' : [35, 39], +- 'red' : [31, 39], +- 'yellow' : [33, 39] +-}; +- +-// Don't use 'blue' not visible on cmd.exe +-inspect.styles = { +- 'special': 'cyan', +- 'number': 'yellow', +- 'boolean': 'yellow', +- 'undefined': 'grey', +- 'null': 'bold', +- 'string': 'green', +- 'date': 'magenta', +- // "name": intentionally not styling +- 'regexp': 'red' +-}; +- +- +-function stylizeWithColor(str, styleType) { +- var style = inspect.styles[styleType]; +- +- if (style) { +- return '\u001b[' + inspect.colors[style][0] + 'm' + str + +- '\u001b[' + inspect.colors[style][1] + 'm'; +- } else { +- return str; +- } +-} +- +- +-function stylizeNoColor(str, styleType) { +- return str; +-} +- +- +-function arrayToHash(array) { +- var hash = {}; +- +- array.forEach(function(val, idx) { +- hash[val] = true; +- }); +- +- return hash; +-} +- +- +-function formatValue(ctx, value, recurseTimes) { +- // Provide a hook for user-specified inspect functions. +- // Check that value is an object with an inspect function on it +- if (ctx.customInspect && +- value && +- isFunction(value.inspect) && +- // Filter out the util module, it's inspect function is special +- value.inspect !== exports.inspect && +- // Also filter out any prototype objects using the circular check. +- !(value.constructor && value.constructor.prototype === value)) { +- var ret = value.inspect(recurseTimes, ctx); +- if (!isString(ret)) { +- ret = formatValue(ctx, ret, recurseTimes); +- } +- return ret; +- } +- +- // Primitive types cannot have properties +- var primitive = formatPrimitive(ctx, value); +- if (primitive) { +- return primitive; +- } +- +- // Look up the keys of the object. +- var keys = Object.keys(value); +- var visibleKeys = arrayToHash(keys); +- +- if (ctx.showHidden) { +- keys = Object.getOwnPropertyNames(value); +- } +- +- // Some type of object without properties can be shortcutted. +- if (keys.length === 0) { +- if (isFunction(value)) { +- var name = value.name ? ': ' + value.name : ''; +- return ctx.stylize('[Function' + name + ']', 'special'); +- } +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } +- if (isDate(value)) { +- return ctx.stylize(Date.prototype.toString.call(value), 'date'); +- } +- if (isError(value)) { +- return formatError(value); +- } +- } +- +- var base = '', array = false, braces = ['{', '}']; +- +- // Make Array say that they are Array +- if (isArray(value)) { +- array = true; +- braces = ['[', ']']; +- } +- +- // Make functions say that they are functions +- if (isFunction(value)) { +- var n = value.name ? ': ' + value.name : ''; +- base = ' [Function' + n + ']'; +- } +- +- // Make RegExps say that they are RegExps +- if (isRegExp(value)) { +- base = ' ' + RegExp.prototype.toString.call(value); +- } +- +- // Make dates with properties first say the date +- if (isDate(value)) { +- base = ' ' + Date.prototype.toUTCString.call(value); +- } +- +- // Make error with message first say the error +- if (isError(value)) { +- base = ' ' + formatError(value); +- } +- +- if (keys.length === 0 && (!array || value.length == 0)) { +- return braces[0] + base + braces[1]; +- } +- +- if (recurseTimes < 0) { +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } else { +- return ctx.stylize('[Object]', 'special'); +- } +- } +- +- ctx.seen.push(value); +- +- var output; +- if (array) { +- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); +- } else { +- output = keys.map(function(key) { +- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); +- }); +- } +- +- ctx.seen.pop(); +- +- return reduceToSingleString(output, base, braces); +-} +- +- +-function formatPrimitive(ctx, value) { +- if (isUndefined(value)) +- return ctx.stylize('undefined', 'undefined'); +- if (isString(value)) { +- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') +- .replace(/'/g, "\\'") +- .replace(/\\"/g, '"') + '\''; +- return ctx.stylize(simple, 'string'); +- } +- if (isNumber(value)) { +- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, +- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . +- if (value === 0 && 1 / value < 0) +- return ctx.stylize('-0', 'number'); +- return ctx.stylize('' + value, 'number'); +- } +- if (isBoolean(value)) +- return ctx.stylize('' + value, 'boolean'); +- // For some reason typeof null is "object", so special case here. +- if (isNull(value)) +- return ctx.stylize('null', 'null'); +-} +- +- +-function formatError(value) { +- return '[' + Error.prototype.toString.call(value) + ']'; +-} +- +- +-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { +- var output = []; +- for (var i = 0, l = value.length; i < l; ++i) { +- if (hasOwnProperty(value, String(i))) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- String(i), true)); +- } else { +- output.push(''); +- } +- } +- keys.forEach(function(key) { +- if (!key.match(/^\d+$/)) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- key, true)); +- } +- }); +- return output; +-} +- +- +-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { +- var name, str, desc; +- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; +- if (desc.get) { +- if (desc.set) { +- str = ctx.stylize('[Getter/Setter]', 'special'); +- } else { +- str = ctx.stylize('[Getter]', 'special'); +- } +- } else { +- if (desc.set) { +- str = ctx.stylize('[Setter]', 'special'); +- } +- } +- if (!hasOwnProperty(visibleKeys, key)) { +- name = '[' + key + ']'; +- } +- if (!str) { +- if (ctx.seen.indexOf(desc.value) < 0) { +- if (isNull(recurseTimes)) { +- str = formatValue(ctx, desc.value, null); +- } else { +- str = formatValue(ctx, desc.value, recurseTimes - 1); +- } +- if (str.indexOf('\n') > -1) { +- if (array) { +- str = str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n').substr(2); +- } else { +- str = '\n' + str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n'); +- } +- } +- } else { +- str = ctx.stylize('[Circular]', 'special'); +- } +- } +- if (isUndefined(name)) { +- if (array && key.match(/^\d+$/)) { +- return str; +- } +- name = JSON.stringify('' + key); +- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { +- name = name.substr(1, name.length - 2); +- name = ctx.stylize(name, 'name'); +- } else { +- name = name.replace(/'/g, "\\'") +- .replace(/\\"/g, '"') +- .replace(/(^"|"$)/g, "'"); +- name = ctx.stylize(name, 'string'); +- } +- } +- +- return name + ': ' + str; +-} +- +- +-function reduceToSingleString(output, base, braces) { +- var numLinesEst = 0; +- var length = output.reduce(function(prev, cur) { +- numLinesEst++; +- if (cur.indexOf('\n') >= 0) numLinesEst++; +- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; +- }, 0); +- +- if (length > 60) { +- return braces[0] + +- (base === '' ? '' : base + '\n ') + +- ' ' + +- output.join(',\n ') + +- ' ' + +- braces[1]; +- } +- +- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +-} +- +- + // NOTE: These type checking functions intentionally don't use `instanceof` + // because it is fragile and can be easily faked with `Object.create()`. + function isArray(ar) { +@@ -522,166 +98,10 @@ function isPrimitive(arg) { + exports.isPrimitive = isPrimitive; + + function isBuffer(arg) { +- return arg instanceof Buffer; ++ return Buffer.isBuffer(arg); + } + exports.isBuffer = isBuffer; + + function objectToString(o) { + return Object.prototype.toString.call(o); +-} +- +- +-function pad(n) { +- return n < 10 ? '0' + n.toString(10) : n.toString(10); +-} +- +- +-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', +- 'Oct', 'Nov', 'Dec']; +- +-// 26 Feb 16:19:34 +-function timestamp() { +- var d = new Date(); +- var time = [pad(d.getHours()), +- pad(d.getMinutes()), +- pad(d.getSeconds())].join(':'); +- return [d.getDate(), months[d.getMonth()], time].join(' '); +-} +- +- +-// log is just a thin wrapper to console.log that prepends a timestamp +-exports.log = function() { +- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +-}; +- +- +-/** +- * Inherit the prototype methods from one constructor into another. +- * +- * The Function.prototype.inherits from lang.js rewritten as a standalone +- * function (not on Function.prototype). NOTE: If this file is to be loaded +- * during bootstrapping this function needs to be rewritten using some native +- * functions as prototype setup using normal JavaScript does not work as +- * expected during bootstrapping (see mirror.js in r114903). +- * +- * @param {function} ctor Constructor function which needs to inherit the +- * prototype. +- * @param {function} superCtor Constructor function to inherit prototype from. +- */ +-exports.inherits = function(ctor, superCtor) { +- ctor.super_ = superCtor; +- ctor.prototype = Object.create(superCtor.prototype, { +- constructor: { +- value: ctor, +- enumerable: false, +- writable: true, +- configurable: true +- } +- }); +-}; +- +-exports._extend = function(origin, add) { +- // Don't do anything if add isn't an object +- if (!add || !isObject(add)) return origin; +- +- var keys = Object.keys(add); +- var i = keys.length; +- while (i--) { +- origin[keys[i]] = add[keys[i]]; +- } +- return origin; +-}; +- +-function hasOwnProperty(obj, prop) { +- return Object.prototype.hasOwnProperty.call(obj, prop); +-} +- +- +-// Deprecated old stuff. +- +-exports.p = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- console.error(exports.inspect(arguments[i])); +- } +-}, 'util.p: Use console.error() instead'); +- +- +-exports.exec = exports.deprecate(function() { +- return require('child_process').exec.apply(this, arguments); +-}, 'util.exec is now called `child_process.exec`.'); +- +- +-exports.print = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(String(arguments[i])); +- } +-}, 'util.print: Use console.log instead'); +- +- +-exports.puts = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(arguments[i] + '\n'); +- } +-}, 'util.puts: Use console.log instead'); +- +- +-exports.debug = exports.deprecate(function(x) { +- process.stderr.write('DEBUG: ' + x + '\n'); +-}, 'util.debug: Use console.error instead'); +- +- +-exports.error = exports.deprecate(function(x) { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stderr.write(arguments[i] + '\n'); +- } +-}, 'util.error: Use console.error instead'); +- +- +-exports.pump = exports.deprecate(function(readStream, writeStream, callback) { +- var callbackCalled = false; +- +- function call(a, b, c) { +- if (callback && !callbackCalled) { +- callback(a, b, c); +- callbackCalled = true; +- } +- } +- +- readStream.addListener('data', function(chunk) { +- if (writeStream.write(chunk) === false) readStream.pause(); +- }); +- +- writeStream.addListener('drain', function() { +- readStream.resume(); +- }); +- +- readStream.addListener('end', function() { +- writeStream.end(); +- }); +- +- readStream.addListener('close', function() { +- call(); +- }); +- +- readStream.addListener('error', function(err) { +- writeStream.end(); +- call(err); +- }); +- +- writeStream.addListener('error', function(err) { +- readStream.destroy(); +- call(err); +- }); +-}, 'util.pump(): Use readableStream.pipe() instead'); +- +- +-var uv; +-exports._errnoException = function(err, syscall) { +- if (isUndefined(uv)) uv = process.binding('uv'); +- var errname = uv.errname(err); +- var e = new Error(syscall + ' ' + errname); +- e.code = errname; +- e.errno = errname; +- e.syscall = syscall; +- return e; +-}; ++} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js new file mode 100644 index 0000000000..9074e8ebcb --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js @@ -0,0 +1,107 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +function isBuffer(arg) { + return Buffer.isBuffer(arg); +} +exports.isBuffer = isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json new file mode 100644 index 0000000000..add87edf58 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json @@ -0,0 +1,53 @@ +{ + "name": "core-util-is", + "version": "1.0.1", + "description": "The `util.is*` functions introduced in Node v0.12.", + "main": "lib/util.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/core-util-is" + }, + "keywords": [ + "util", + "isBuffer", + "isArray", + "isNumber", + "isString", + "isRegExp", + "isThis", + "isThat", + "polyfill" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/isaacs/core-util-is/issues" + }, + "readme": "# core-util-is\n\nThe `util.is*` functions introduced in Node v0.12.\n", + "readmeFilename": "README.md", + "homepage": "https://github.com/isaacs/core-util-is", + "_id": "core-util-is@1.0.1", + "dist": { + "shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538", + "tarball": "http://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" + }, + "_from": "core-util-is@~1.0.0", + "_npmVersion": "1.3.23", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_shasum": "6b07085aef9a3ccac6ee53bf9d3df0c1521a5538", + "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.1.tgz" +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js new file mode 100644 index 0000000000..007fa10575 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js @@ -0,0 +1,106 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && objectToString(e) === '[object Error]'; +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +function isBuffer(arg) { + return arg instanceof Buffer; +} +exports.isBuffer = isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md new file mode 100644 index 0000000000..052a62b8d7 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md @@ -0,0 +1,54 @@ + +# isarray + +`Array#isArray` for older browsers. + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/browserify). + +With [component](http://component.io) do + +```bash +$ component install juliangruber/isarray +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.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/bl/node_modules/readable-stream/node_modules/isarray/build/build.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/build/build.js new file mode 100644 index 0000000000..ec58596aee --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/build/build.js @@ -0,0 +1,209 @@ + +/** + * Require the given path. + * + * @param {String} path + * @return {Object} exports + * @api public + */ + +function require(path, parent, orig) { + var resolved = require.resolve(path); + + // lookup failed + if (null == resolved) { + orig = orig || path; + parent = parent || 'root'; + var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); + err.path = orig; + err.parent = parent; + err.require = true; + throw err; + } + + var module = require.modules[resolved]; + + // perform real require() + // by invoking the module's + // registered function + if (!module.exports) { + module.exports = {}; + module.client = module.component = true; + module.call(this, module.exports, require.relative(resolved), module); + } + + return module.exports; +} + +/** + * Registered modules. + */ + +require.modules = {}; + +/** + * Registered aliases. + */ + +require.aliases = {}; + +/** + * Resolve `path`. + * + * Lookup: + * + * - PATH/index.js + * - PATH.js + * - PATH + * + * @param {String} path + * @return {String} path or null + * @api private + */ + +require.resolve = function(path) { + if (path.charAt(0) === '/') path = path.slice(1); + var index = path + '/index.js'; + + var paths = [ + path, + path + '.js', + path + '.json', + path + '/index.js', + path + '/index.json' + ]; + + for (var i = 0; i < paths.length; i++) { + var path = paths[i]; + if (require.modules.hasOwnProperty(path)) return path; + } + + if (require.aliases.hasOwnProperty(index)) { + return require.aliases[index]; + } +}; + +/** + * Normalize `path` relative to the current path. + * + * @param {String} curr + * @param {String} path + * @return {String} + * @api private + */ + +require.normalize = function(curr, path) { + var segs = []; + + if ('.' != path.charAt(0)) return path; + + curr = curr.split('/'); + path = path.split('/'); + + for (var i = 0; i < path.length; ++i) { + if ('..' == path[i]) { + curr.pop(); + } else if ('.' != path[i] && '' != path[i]) { + segs.push(path[i]); + } + } + + return curr.concat(segs).join('/'); +}; + +/** + * Register module at `path` with callback `definition`. + * + * @param {String} path + * @param {Function} definition + * @api private + */ + +require.register = function(path, definition) { + require.modules[path] = definition; +}; + +/** + * Alias a module definition. + * + * @param {String} from + * @param {String} to + * @api private + */ + +require.alias = function(from, to) { + if (!require.modules.hasOwnProperty(from)) { + throw new Error('Failed to alias "' + from + '", it does not exist'); + } + require.aliases[to] = from; +}; + +/** + * Return a require function relative to the `parent` path. + * + * @param {String} parent + * @return {Function} + * @api private + */ + +require.relative = function(parent) { + var p = require.normalize(parent, '..'); + + /** + * lastIndexOf helper. + */ + + function lastIndexOf(arr, obj) { + var i = arr.length; + while (i--) { + if (arr[i] === obj) return i; + } + return -1; + } + + /** + * The relative require() itself. + */ + + function localRequire(path) { + var resolved = localRequire.resolve(path); + return require(resolved, parent, path); + } + + /** + * Resolve relative to the parent. + */ + + localRequire.resolve = function(path) { + var c = path.charAt(0); + if ('/' == c) return path.slice(1); + if ('.' == c) return require.normalize(p, path); + + // resolve deps by returning + // the dep in the nearest "deps" + // directory + var segs = parent.split('/'); + var i = lastIndexOf(segs, 'deps') + 1; + if (!i) i = 0; + path = segs.slice(0, i + 1).join('/') + '/deps/' + path; + return path; + }; + + /** + * Check if module is defined at `path`. + */ + + localRequire.exists = function(path) { + return require.modules.hasOwnProperty(localRequire.resolve(path)); + }; + + return localRequire; +}; +require.register("isarray/index.js", function(exports, require, module){ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + +}); +require.alias("isarray/index.js", "isarray/index.js"); + diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json new file mode 100644 index 0000000000..9e31b68388 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json @@ -0,0 +1,19 @@ +{ + "name" : "isarray", + "description" : "Array#isArray for older browsers", + "version" : "0.0.1", + "repository" : "juliangruber/isarray", + "homepage": "https://github.com/juliangruber/isarray", + "main" : "index.js", + "scripts" : [ + "index.js" + ], + "dependencies" : {}, + "keywords": ["browser","isarray","array"], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT" +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js new file mode 100644 index 0000000000..5f5ad45d46 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js @@ -0,0 +1,3 @@ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json new file mode 100644 index 0000000000..fc7904b67b --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json @@ -0,0 +1,54 @@ +{ + "name": "isarray", + "description": "Array#isArray for older browsers", + "version": "0.0.1", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "homepage": "https://github.com/juliangruber/isarray", + "main": "index.js", + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": {}, + "devDependencies": { + "tap": "*" + }, + "keywords": [ + "browser", + "isarray", + "array" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "readme": "\n# isarray\n\n`Array#isArray` for older browsers.\n\n## Usage\n\n```js\nvar isArray = require('isarray');\n\nconsole.log(isArray([])); // => true\nconsole.log(isArray({})); // => false\n```\n\n## Installation\n\nWith [npm](http://npmjs.org) do\n\n```bash\n$ npm install isarray\n```\n\nThen bundle for the browser with\n[browserify](https://github.com/substack/browserify).\n\nWith [component](http://component.io) do\n\n```bash\n$ component install juliangruber/isarray\n```\n\n## License\n\n(MIT)\n\nCopyright (c) 2013 Julian Gruber <julian@juliangruber.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", + "readmeFilename": "README.md", + "_id": "isarray@0.0.1", + "dist": { + "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "_from": "isarray@0.0.1", + "_npmVersion": "1.2.18", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "directories": {}, + "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + } +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore new file mode 100644 index 0000000000..206320cc1d --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore @@ -0,0 +1,2 @@ +build +test diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE new file mode 100644 index 0000000000..6de584a48f --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE @@ -0,0 +1,20 @@ +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md new file mode 100644 index 0000000000..4d2aa00150 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md @@ -0,0 +1,7 @@ +**string_decoder.js** (`require('string_decoder')`) from Node.js core + +Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. + +Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** + +The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js new file mode 100644 index 0000000000..b00e54fb79 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -0,0 +1,221 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var Buffer = require('buffer').Buffer; + +var isBufferEncoding = Buffer.isEncoding + || function(encoding) { + switch (encoding && encoding.toLowerCase()) { + case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; + default: return false; + } + } + + +function assertEncoding(encoding) { + if (encoding && !isBufferEncoding(encoding)) { + throw new Error('Unknown encoding: ' + encoding); + } +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. +var StringDecoder = exports.StringDecoder = function(encoding) { + this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); + assertEncoding(encoding); + switch (this.encoding) { + case 'utf8': + // CESU-8 represents each of Surrogate Pair by 3-bytes + this.surrogateSize = 3; + break; + case 'ucs2': + case 'utf16le': + // UTF-16 represents each of Surrogate Pair by 2-bytes + this.surrogateSize = 2; + this.detectIncompleteChar = utf16DetectIncompleteChar; + break; + case 'base64': + // Base-64 stores 3 bytes in 4 chars, and pads the remainder. + this.surrogateSize = 3; + this.detectIncompleteChar = base64DetectIncompleteChar; + break; + default: + this.write = passThroughWrite; + return; + } + + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). + this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. + this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. + this.charLength = 0; +}; + + +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . +StringDecoder.prototype.write = function(buffer) { + var charStr = ''; + // if our last write ended with an incomplete multibyte character + while (this.charLength) { + // determine how many remaining bytes this buffer has to offer for this char + var available = (buffer.length >= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; + } + + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; + } + this.charReceived = this.charLength = 0; + + // if there are no more bytes in this buffer, just emit our char + if (buffer.length === 0) { + return charStr; + } + break; + } + + // determine and set charLength / charReceived + this.detectIncompleteChar(buffer); + + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; + } + + charStr += buffer.toString(this.encoding, 0, end); + + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + buffer.copy(this.charBuffer, 0, 0, size); + return charStr.substring(0, end); + } + + // or just emit the charStr + return charStr; +}; + +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. +StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; + + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; + + // See http://en.wikipedia.org/wiki/UTF-8#Description + + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } + + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } + + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + this.charReceived = i; +}; + +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); + + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } + + return res; +}; + +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); +} + +function utf16DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; +} + +function base64DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json new file mode 100644 index 0000000000..a8c586bfb9 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -0,0 +1,54 @@ +{ + "name": "string_decoder", + "version": "0.10.31", + "description": "The string_decoder module from Node core", + "main": "index.js", + "dependencies": {}, + "devDependencies": { + "tap": "~0.4.8" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/rvagg/string_decoder.git" + }, + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT", + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", + "bugs": { + "url": "https://github.com/rvagg/string_decoder/issues" + }, + "_id": "string_decoder@0.10.31", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_from": "string_decoder@~0.10.x", + "_npmVersion": "1.4.23", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json new file mode 100644 index 0000000000..1448587013 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json @@ -0,0 +1,69 @@ +{ + "name": "readable-stream", + "version": "1.0.31", + "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x", + "main": "readable.js", + "dependencies": { + "core-util-is": "~1.0.0", + "isarray": "0.0.1", + "string_decoder": "~0.10.x", + "inherits": "~2.0.1" + }, + "devDependencies": { + "tap": "~0.2.6" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/readable-stream" + }, + "keywords": [ + "readable", + "stream", + "pipe" + ], + "browser": { + "util": false + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/isaacs/readable-stream/issues" + }, + "homepage": "https://github.com/isaacs/readable-stream", + "_id": "readable-stream@1.0.31", + "_shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "_from": "readable-stream@~1.0.26", + "_npmVersion": "1.4.9", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "8f2502e0bc9e3b0da1b94520aabb4e2603ecafae", + "tarball": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js new file mode 100644 index 0000000000..27e8d8a551 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_passthrough.js") diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js new file mode 100644 index 0000000000..4d1ddfc734 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/readable.js @@ -0,0 +1,6 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js new file mode 100644 index 0000000000..5d482f0780 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_transform.js") diff --git a/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js new file mode 100644 index 0000000000..e1e9efdf3c --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/node_modules/readable-stream/writable.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_writable.js") diff --git a/deps/npm/node_modules/request/node_modules/bl/package.json b/deps/npm/node_modules/request/node_modules/bl/package.json new file mode 100644 index 0000000000..19c4ac079f --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/package.json @@ -0,0 +1,60 @@ +{ + "name": "bl", + "version": "0.9.1", + "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!", + "main": "bl.js", + "scripts": { + "test": "node test/test.js | faucet", + "test-local": "brtapsauce-local test/basic-test.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/rvagg/bl.git" + }, + "homepage": "https://github.com/rvagg/bl", + "authors": [ + "Rod Vagg (https://github.com/rvagg)", + "Matteo Collina (https://github.com/mcollina)" + ], + "keywords": [ + "buffer", + "buffers", + "stream", + "awesomesauce" + ], + "license": "MIT", + "dependencies": { + "readable-stream": "~1.0.26" + }, + "devDependencies": { + "tape": "~2.12.3", + "hash_file": "~0.1.1", + "faucet": "~0.0.1", + "brtapsauce": "~0.3.0" + }, + "gitHead": "53d3d10e39be326feb049ab27437173b3ce47ec4", + "bugs": { + "url": "https://github.com/rvagg/bl/issues" + }, + "_id": "bl@0.9.1", + "_shasum": "d262c5b83aa5cf4386cea1d998c82b36d7ae2942", + "_from": "bl@~0.9.0", + "_npmVersion": "1.4.21", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "maintainers": [ + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "dist": { + "shasum": "d262c5b83aa5cf4386cea1d998c82b36d7ae2942", + "tarball": "http://registry.npmjs.org/bl/-/bl-0.9.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/bl/-/bl-0.9.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/deps/npm/node_modules/request/node_modules/bl/test/basic-test.js b/deps/npm/node_modules/request/node_modules/bl/test/basic-test.js new file mode 100644 index 0000000000..75116a30f4 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/test/basic-test.js @@ -0,0 +1,541 @@ +var tape = require('tape') + , crypto = require('crypto') + , fs = require('fs') + , hash = require('hash_file') + , BufferList = require('../') + + , encodings = + ('hex utf8 utf-8 ascii binary base64' + + (process.browser ? '' : ' ucs2 ucs-2 utf16le utf-16le')).split(' ') + +tape('single bytes from single buffer', function (t) { + var bl = new BufferList() + bl.append(new Buffer('abcd')) + + t.equal(bl.length, 4) + + t.equal(bl.get(0), 97) + t.equal(bl.get(1), 98) + t.equal(bl.get(2), 99) + t.equal(bl.get(3), 100) + + t.end() +}) + +tape('single bytes from multiple buffers', function (t) { + var bl = new BufferList() + bl.append(new Buffer('abcd')) + bl.append(new Buffer('efg')) + bl.append(new Buffer('hi')) + bl.append(new Buffer('j')) + + t.equal(bl.length, 10) + + t.equal(bl.get(0), 97) + t.equal(bl.get(1), 98) + t.equal(bl.get(2), 99) + t.equal(bl.get(3), 100) + t.equal(bl.get(4), 101) + t.equal(bl.get(5), 102) + t.equal(bl.get(6), 103) + t.equal(bl.get(7), 104) + t.equal(bl.get(8), 105) + t.equal(bl.get(9), 106) + t.end() +}) + +tape('multi bytes from single buffer', function (t) { + var bl = new BufferList() + bl.append(new Buffer('abcd')) + + t.equal(bl.length, 4) + + t.equal(bl.slice(0, 4).toString('ascii'), 'abcd') + t.equal(bl.slice(0, 3).toString('ascii'), 'abc') + t.equal(bl.slice(1, 4).toString('ascii'), 'bcd') + + t.end() +}) + +tape('multiple bytes from multiple buffers', function (t) { + var bl = new BufferList() + + bl.append(new Buffer('abcd')) + bl.append(new Buffer('efg')) + bl.append(new Buffer('hi')) + bl.append(new Buffer('j')) + + t.equal(bl.length, 10) + + t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') + t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') + t.equal(bl.slice(3, 6).toString('ascii'), 'def') + t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') + t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') + + t.end() +}) + +tape('multiple bytes from multiple buffer lists', function (t) { + var bl = new BufferList() + + bl.append(new BufferList([new Buffer('abcd'), new Buffer('efg')])) + bl.append(new BufferList([new Buffer('hi'), new Buffer('j')])) + + t.equal(bl.length, 10) + + t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') + t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') + t.equal(bl.slice(3, 6).toString('ascii'), 'def') + t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') + t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') + + t.end() +}) + +tape('consuming from multiple buffers', function (t) { + var bl = new BufferList() + + bl.append(new Buffer('abcd')) + bl.append(new Buffer('efg')) + bl.append(new Buffer('hi')) + bl.append(new Buffer('j')) + + t.equal(bl.length, 10) + + t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') + + bl.consume(3) + t.equal(bl.length, 7) + t.equal(bl.slice(0, 7).toString('ascii'), 'defghij') + + bl.consume(2) + t.equal(bl.length, 5) + t.equal(bl.slice(0, 5).toString('ascii'), 'fghij') + + bl.consume(1) + t.equal(bl.length, 4) + t.equal(bl.slice(0, 4).toString('ascii'), 'ghij') + + bl.consume(1) + t.equal(bl.length, 3) + t.equal(bl.slice(0, 3).toString('ascii'), 'hij') + + bl.consume(2) + t.equal(bl.length, 1) + t.equal(bl.slice(0, 1).toString('ascii'), 'j') + + t.end() +}) + +tape('test readUInt8 / readInt8', function (t) { + var buf1 = new Buffer(1) + , buf2 = new Buffer(3) + , buf3 = new Buffer(3) + , bl = new BufferList() + + buf2[1] = 0x3 + buf2[2] = 0x4 + buf3[0] = 0x23 + buf3[1] = 0x42 + + bl.append(buf1) + bl.append(buf2) + bl.append(buf3) + + t.equal(bl.readUInt8(2), 0x3) + t.equal(bl.readInt8(2), 0x3) + t.equal(bl.readUInt8(3), 0x4) + t.equal(bl.readInt8(3), 0x4) + t.equal(bl.readUInt8(4), 0x23) + t.equal(bl.readInt8(4), 0x23) + t.equal(bl.readUInt8(5), 0x42) + t.equal(bl.readInt8(5), 0x42) + t.end() +}) + +tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) { + var buf1 = new Buffer(1) + , buf2 = new Buffer(3) + , buf3 = new Buffer(3) + , bl = new BufferList() + + buf2[1] = 0x3 + buf2[2] = 0x4 + buf3[0] = 0x23 + buf3[1] = 0x42 + + bl.append(buf1) + bl.append(buf2) + bl.append(buf3) + + t.equal(bl.readUInt16BE(2), 0x0304) + t.equal(bl.readUInt16LE(2), 0x0403) + t.equal(bl.readInt16BE(2), 0x0304) + t.equal(bl.readInt16LE(2), 0x0403) + t.equal(bl.readUInt16BE(3), 0x0423) + t.equal(bl.readUInt16LE(3), 0x2304) + t.equal(bl.readInt16BE(3), 0x0423) + t.equal(bl.readInt16LE(3), 0x2304) + t.equal(bl.readUInt16BE(4), 0x2342) + t.equal(bl.readUInt16LE(4), 0x4223) + t.equal(bl.readInt16BE(4), 0x2342) + t.equal(bl.readInt16LE(4), 0x4223) + t.end() +}) + +tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) { + var buf1 = new Buffer(1) + , buf2 = new Buffer(3) + , buf3 = new Buffer(3) + , bl = new BufferList() + + buf2[1] = 0x3 + buf2[2] = 0x4 + buf3[0] = 0x23 + buf3[1] = 0x42 + + bl.append(buf1) + bl.append(buf2) + bl.append(buf3) + + t.equal(bl.readUInt32BE(2), 0x03042342) + t.equal(bl.readUInt32LE(2), 0x42230403) + t.equal(bl.readInt32BE(2), 0x03042342) + t.equal(bl.readInt32LE(2), 0x42230403) + t.end() +}) + +tape('test readFloatLE / readFloatBE', function (t) { + var buf1 = new Buffer(1) + , buf2 = new Buffer(3) + , buf3 = new Buffer(3) + , bl = new BufferList() + + buf2[1] = 0x00 + buf2[2] = 0x00 + buf3[0] = 0x80 + buf3[1] = 0x3f + + bl.append(buf1) + bl.append(buf2) + bl.append(buf3) + + t.equal(bl.readFloatLE(2), 0x01) + t.end() +}) + +tape('test readDoubleLE / readDoubleBE', function (t) { + var buf1 = new Buffer(1) + , buf2 = new Buffer(3) + , buf3 = new Buffer(10) + , bl = new BufferList() + + buf2[1] = 0x55 + buf2[2] = 0x55 + buf3[0] = 0x55 + buf3[1] = 0x55 + buf3[2] = 0x55 + buf3[3] = 0x55 + buf3[4] = 0xd5 + buf3[5] = 0x3f + + bl.append(buf1) + bl.append(buf2) + bl.append(buf3) + + t.equal(bl.readDoubleLE(2), 0.3333333333333333) + t.end() +}) + +tape('test toString', function (t) { + var bl = new BufferList() + + bl.append(new Buffer('abcd')) + bl.append(new Buffer('efg')) + bl.append(new Buffer('hi')) + bl.append(new Buffer('j')) + + t.equal(bl.toString('ascii', 0, 10), 'abcdefghij') + t.equal(bl.toString('ascii', 3, 10), 'defghij') + t.equal(bl.toString('ascii', 3, 6), 'def') + t.equal(bl.toString('ascii', 3, 8), 'defgh') + t.equal(bl.toString('ascii', 5, 10), 'fghij') + + t.end() +}) + +tape('test toString encoding', function (t) { + var bl = new BufferList() + , b = new Buffer('abcdefghij\xff\x00') + + bl.append(new Buffer('abcd')) + bl.append(new Buffer('efg')) + bl.append(new Buffer('hi')) + bl.append(new Buffer('j')) + bl.append(new Buffer('\xff\x00')) + + encodings.forEach(function (enc) { + t.equal(bl.toString(enc), b.toString(enc), enc) + }) + + t.end() +}) + +!process.browser && tape('test stream', function (t) { + var random = crypto.randomBytes(65534) + , rndhash = hash(random, 'md5') + , md5sum = crypto.createHash('md5') + , bl = new BufferList(function (err, buf) { + t.ok(Buffer.isBuffer(buf)) + t.ok(err === null) + t.equal(rndhash, hash(bl.slice(), 'md5')) + t.equal(rndhash, hash(buf, 'md5')) + + bl.pipe(fs.createWriteStream('/tmp/bl_test_rnd_out.dat')) + .on('close', function () { + var s = fs.createReadStream('/tmp/bl_test_rnd_out.dat') + s.on('data', md5sum.update.bind(md5sum)) + s.on('end', function() { + t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!') + t.end() + }) + }) + + }) + + fs.writeFileSync('/tmp/bl_test_rnd.dat', random) + fs.createReadStream('/tmp/bl_test_rnd.dat').pipe(bl) +}) + +tape('instantiation with Buffer', function (t) { + var buf = crypto.randomBytes(1024) + , buf2 = crypto.randomBytes(1024) + , b = BufferList(buf) + + t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer') + b = BufferList([ buf, buf2 ]) + t.equal(b.slice().toString('hex'), Buffer.concat([ buf, buf2 ]).toString('hex'), 'same buffer') + t.end() +}) + +tape('test String appendage', function (t) { + var bl = new BufferList() + , b = new Buffer('abcdefghij\xff\x00') + + bl.append('abcd') + bl.append('efg') + bl.append('hi') + bl.append('j') + bl.append('\xff\x00') + + encodings.forEach(function (enc) { + t.equal(bl.toString(enc), b.toString(enc)) + }) + + t.end() +}) + +tape('write nothing, should get empty buffer', function (t) { + t.plan(3) + BufferList(function (err, data) { + t.notOk(err, 'no error') + t.ok(Buffer.isBuffer(data), 'got a buffer') + t.equal(0, data.length, 'got a zero-length buffer') + t.end() + }).end() +}) + +tape('unicode string', function (t) { + t.plan(2) + var inp1 = '\u2600' + , inp2 = '\u2603' + , exp = inp1 + ' and ' + inp2 + , bl = BufferList() + bl.write(inp1) + bl.write(' and ') + bl.write(inp2) + t.equal(exp, bl.toString()) + t.equal(new Buffer(exp).toString('hex'), bl.toString('hex')) +}) + +tape('should emit finish', function (t) { + var source = BufferList() + , dest = BufferList() + + source.write('hello') + source.pipe(dest) + + dest.on('finish', function () { + t.equal(dest.toString('utf8'), 'hello') + t.end() + }) +}) + +tape('basic copy', function (t) { + var buf = crypto.randomBytes(1024) + , buf2 = new Buffer(1024) + , b = BufferList(buf) + + b.copy(buf2) + t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') + t.end() +}) + +tape('copy after many appends', function (t) { + var buf = crypto.randomBytes(512) + , buf2 = new Buffer(1024) + , b = BufferList(buf) + + b.append(buf) + b.copy(buf2) + t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') + t.end() +}) + +tape('copy at a precise position', function (t) { + var buf = crypto.randomBytes(1004) + , buf2 = new Buffer(1024) + , b = BufferList(buf) + + b.copy(buf2, 20) + t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer') + t.end() +}) + +tape('copy starting from a precise location', function (t) { + var buf = crypto.randomBytes(10) + , buf2 = new Buffer(5) + , b = BufferList(buf) + + b.copy(buf2, 0, 5) + t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer') + t.end() +}) + +tape('copy in an interval', function (t) { + var rnd = crypto.randomBytes(10) + , b = BufferList(rnd) // put the random bytes there + , actual = new Buffer(3) + , expected = new Buffer(3) + + rnd.copy(expected, 0, 5, 8) + b.copy(actual, 0, 5, 8) + + t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer') + t.end() +}) + +tape('copy an interval between two buffers', function (t) { + var buf = crypto.randomBytes(10) + , buf2 = new Buffer(10) + , b = BufferList(buf) + + b.append(buf) + b.copy(buf2, 0, 5, 15) + + t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer') + t.end() +}) + +tape('duplicate', function (t) { + t.plan(2) + + var bl = new BufferList('abcdefghij\xff\x00') + , dup = bl.duplicate() + + t.equal(bl.prototype, dup.prototype) + t.equal(bl.toString('hex'), dup.toString('hex')) +}) + +tape('destroy no pipe', function (t) { + t.plan(2) + + var bl = new BufferList('alsdkfja;lsdkfja;lsdk') + bl.destroy() + + t.equal(bl._bufs.length, 0) + t.equal(bl.length, 0) +}) + +!process.browser && tape('destroy with pipe before read end', function (t) { + t.plan(2) + + var bl = new BufferList() + fs.createReadStream(__dirname + '/sauce.js') + .pipe(bl) + + bl.destroy() + + t.equal(bl._bufs.length, 0) + t.equal(bl.length, 0) + +}) + +!process.browser && tape('destroy with pipe before read end with race', function (t) { + t.plan(2) + + var bl = new BufferList() + fs.createReadStream(__dirname + '/sauce.js') + .pipe(bl) + + setTimeout(function () { + bl.destroy() + setTimeout(function () { + t.equal(bl._bufs.length, 0) + t.equal(bl.length, 0) + }, 500) + }, 500) +}) + +!process.browser && tape('destroy with pipe after read end', function (t) { + t.plan(2) + + var bl = new BufferList() + fs.createReadStream(__dirname + '/sauce.js') + .on('end', onEnd) + .pipe(bl) + + function onEnd () { + bl.destroy() + + t.equal(bl._bufs.length, 0) + t.equal(bl.length, 0) + } +}) + +!process.browser && tape('destroy with pipe while writing to a destination', function (t) { + t.plan(4) + + var bl = new BufferList() + , ds = new BufferList() + + fs.createReadStream(__dirname + '/sauce.js') + .on('end', onEnd) + .pipe(bl) + + function onEnd () { + bl.pipe(ds) + + setTimeout(function () { + bl.destroy() + + t.equals(bl._bufs.length, 0) + t.equals(bl.length, 0) + + ds.destroy() + + t.equals(bl._bufs.length, 0) + t.equals(bl.length, 0) + + }, 100) + } +}) + +!process.browser && tape('handle error', function (t) { + t.plan(2) + fs.createReadStream('/does/not/exist').pipe(BufferList(function (err, data) { + t.ok(err instanceof Error, 'has error') + t.notOk(data, 'no data') + })) +}) diff --git a/deps/npm/node_modules/request/node_modules/bl/test/sauce.js b/deps/npm/node_modules/request/node_modules/bl/test/sauce.js new file mode 100644 index 0000000000..a6d28625fb --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/test/sauce.js @@ -0,0 +1,38 @@ +#!/usr/bin/env node + +const user = process.env.SAUCE_USER + , key = process.env.SAUCE_KEY + , path = require('path') + , brtapsauce = require('brtapsauce') + , testFile = path.join(__dirname, 'basic-test.js') + + , capabilities = [ + { browserName: 'chrome' , platform: 'Windows XP', version: '' } + , { browserName: 'firefox' , platform: 'Windows 8' , version: '' } + , { browserName: 'firefox' , platform: 'Windows XP', version: '4' } + , { browserName: 'internet explorer' , platform: 'Windows 8' , version: '10' } + , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '9' } + , { browserName: 'internet explorer' , platform: 'Windows 7' , version: '8' } + , { browserName: 'internet explorer' , platform: 'Windows XP', version: '7' } + , { browserName: 'internet explorer' , platform: 'Windows XP', version: '6' } + , { browserName: 'safari' , platform: 'Windows 7' , version: '5' } + , { browserName: 'safari' , platform: 'OS X 10.8' , version: '6' } + , { browserName: 'opera' , platform: 'Windows 7' , version: '' } + , { browserName: 'opera' , platform: 'Windows 7' , version: '11' } + , { browserName: 'ipad' , platform: 'OS X 10.8' , version: '6' } + , { browserName: 'android' , platform: 'Linux' , version: '4.0', 'device-type': 'tablet' } + ] + +if (!user) + throw new Error('Must set a SAUCE_USER env var') +if (!key) + throw new Error('Must set a SAUCE_KEY env var') + +brtapsauce({ + name : 'Traversty' + , user : user + , key : key + , brsrc : testFile + , capabilities : capabilities + , options : { timeout: 60 * 6 } +}) \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/bl/test/test.js b/deps/npm/node_modules/request/node_modules/bl/test/test.js new file mode 100644 index 0000000000..aa9b48771a --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/bl/test/test.js @@ -0,0 +1,9 @@ +require('./basic-test') + +if (!process.env.SAUCE_KEY || !process.env.SAUCE_USER) + return console.log('SAUCE_KEY and/or SAUCE_USER not set, not running sauce tests') + +if (!/v0\.10/.test(process.version)) + return console.log('Not Node v0.10.x, not running sauce tests') + +require('./sauce.js') \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/caseless/README.md b/deps/npm/node_modules/request/node_modules/caseless/README.md new file mode 100644 index 0000000000..719584c85b --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/caseless/README.md @@ -0,0 +1,45 @@ +## Caseless -- wrap an object to set and get property with caseless semantics but also preserve caseing. + +This library is incredibly useful when working with HTTP headers. It allows you to get/set/check for headers in a caseless manor while also preserving the caseing of headers the first time they are set. + +## Usage + +```javascript +var headers = {} + , c = caseless(headers) + ; +c.set('a-Header', 'asdf') +c.get('a-header') === 'asdf' +``` + +## has(key) + +Has takes a name and if it finds a matching header will return that header name with the preserved caseing it was set with. + +```javascript +c.has('a-header') === 'a-Header' +``` + +## set(key, value[, clobber=true]) + +Set is fairly straight forward except that if the header exists and clobber is disabled it will add `','+value` to the existing header. + +```javascript +c.set('a-Header', 'fdas') +c.set('a-HEADER', 'more', false) +c.get('a-header') === 'fdsa,more' +``` + +## swap(key) + +Swaps the casing of a header with the new one that is passed in. + +```javascript +var headers = {} + , c = caseless(headers) + ; +c.set('a-Header', 'fdas') +c.swap('a-HEADER') +c.has('a-header') === 'a-HEADER' +headers === {'a-HEADER': 'fdas'} +``` diff --git a/deps/npm/node_modules/request/node_modules/caseless/index.js b/deps/npm/node_modules/request/node_modules/caseless/index.js new file mode 100644 index 0000000000..231a997e0a --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/caseless/index.js @@ -0,0 +1,65 @@ +function Caseless (dict) { + this.dict = dict +} +Caseless.prototype.set = function (name, value, clobber) { + if (typeof name === 'object') { + for (var i in name) { + this.set(i, name[i], value) + } + } else { + if (typeof clobber === 'undefined') clobber = true + var has = this.has(name) + + if (!clobber && has) this.dict[has] = this.dict[has] + ',' + value + else this.dict[has || name] = value + return has + } +} +Caseless.prototype.has = function (name) { + var keys = Object.keys(this.dict) + , name = name.toLowerCase() + ; + for (var i=0;i read file till the end + // + // TODO: Looks like there is bug in Node fs.createReadStream + // it doesn't respect `end` options without `start` options + // Fix it when node fixes it. + // https://github.com/joyent/node/issues/7819 + if (value.end != undefined && value.end != Infinity && value.start != undefined) { + + // when end specified + // no need to calculate range + // inclusive, starts with 0 + next(null, value.end+1 - (value.start ? value.start : 0)); + + // not that fast snoopy + } else { + // still need to fetch file size from fs + fs.stat(value.path, function(err, stat) { + + var fileSize; + + if (err) { + next(err); + return; + } + + // update final size based on the range options + fileSize = stat.size - (value.start ? value.start : 0); + next(null, fileSize); + }); + } // or http response } else if (value.hasOwnProperty('httpVersion')) { @@ -255,8 +279,7 @@ FormData.prototype.submit = function(params, cb) { var request , options , defaults = { - method : 'post', - headers: this.getHeaders() + method : 'post' }; // parse provided url if it's string @@ -279,6 +302,9 @@ FormData.prototype.submit = function(params, cb) { } } + // put that good code in getHeaders to some use + options.headers = this.getHeaders(params.headers); + // https if specified, fallback to http in any other case if (params.protocol == 'https:') { request = https.request(options); diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml new file mode 100644 index 0000000000..6e5919de39 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/LICENSE b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/LICENSE index b7f9d5001c..8f29698588 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/LICENSE +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2010 Caolan McMahon +Copyright (c) 2010-2014 Caolan McMahon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/README.md b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/README.md index 9ff1acfdf5..0bea5311a8 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/README.md +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/README.md @@ -1,15 +1,18 @@ # Async.js +[![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async) + + Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. Although originally designed for -use with [node.js](http://nodejs.org), it can also be used directly in the +use with [Node.js](http://nodejs.org), it can also be used directly in the browser. Also supports [component](https://github.com/component/component). Async provides around 20 functions that include the usual 'functional' -suspects (map, reduce, filter, each…) as well as some common patterns -for asynchronous control flow (parallel, series, waterfall…). All these -functions assume you follow the node.js convention of providing a single -callback as the last argument of your async function. +suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns +for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these +functions assume you follow the Node.js convention of providing a single +callback as the last argument of your `async` function. ## Quick Examples @@ -42,8 +45,8 @@ missing please create a GitHub issue for it. ### Binding a context to an iterator -This section is really about bind, not about async. If you are wondering how to -make async execute your iterators in a given context, or are confused as to why +This section is really about `bind`, not about `async`. If you are wondering how to +make `async` execute your iterators in a given context, or are confused as to why a method of another library isn't working as an iterator, study this example: ```js @@ -78,7 +81,7 @@ async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), fun The source is available for download from [GitHub](http://github.com/caolan/async). -Alternatively, you can install using Node Package Manager (npm): +Alternatively, you can install using Node Package Manager (`npm`): npm install async @@ -86,7 +89,9 @@ __Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async ## In the Browser -So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: +So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. + +Usage: ```html @@ -103,45 +108,59 @@ So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: ### Collections -* [each](#each) -* [map](#map) -* [filter](#filter) -* [reject](#reject) -* [reduce](#reduce) -* [detect](#detect) -* [sortBy](#sortBy) -* [some](#some) -* [every](#every) -* [concat](#concat) +* [`each`](#each) +* [`eachSeries`](#eachSeries) +* [`eachLimit`](#eachLimit) +* [`map`](#map) +* [`mapSeries`](#mapSeries) +* [`mapLimit`](#mapLimit) +* [`filter`](#filter) +* [`filterSeries`](#filterSeries) +* [`reject`](#reject) +* [`rejectSeries`](#rejectSeries) +* [`reduce`](#reduce) +* [`reduceRight`](#reduceRight) +* [`detect`](#detect) +* [`detectSeries`](#detectSeries) +* [`sortBy`](#sortBy) +* [`some`](#some) +* [`every`](#every) +* [`concat`](#concat) +* [`concatSeries`](#concatSeries) ### Control Flow -* [series](#series) -* [parallel](#parallel) -* [whilst](#whilst) -* [doWhilst](#doWhilst) -* [until](#until) -* [doUntil](#doUntil) -* [forever](#forever) -* [waterfall](#waterfall) -* [compose](#compose) -* [applyEach](#applyEach) -* [queue](#queue) -* [cargo](#cargo) -* [auto](#auto) -* [iterator](#iterator) -* [apply](#apply) -* [nextTick](#nextTick) -* [times](#times) -* [timesSeries](#timesSeries) +* [`series`](#seriestasks-callback) +* [`parallel`](#parallel) +* [`parallelLimit`](#parallellimittasks-limit-callback) +* [`whilst`](#whilst) +* [`doWhilst`](#doWhilst) +* [`until`](#until) +* [`doUntil`](#doUntil) +* [`forever`](#forever) +* [`waterfall`](#waterfall) +* [`compose`](#compose) +* [`seq`](#seq) +* [`applyEach`](#applyEach) +* [`applyEachSeries`](#applyEachSeries) +* [`queue`](#queue) +* [`priorityQueue`](#priorityQueue) +* [`cargo`](#cargo) +* [`auto`](#auto) +* [`retry`](#retry) +* [`iterator`](#iterator) +* [`apply`](#apply) +* [`nextTick`](#nextTick) +* [`times`](#times) +* [`timesSeries`](#timesSeries) ### Utils -* [memoize](#memoize) -* [unmemoize](#unmemoize) -* [log](#log) -* [dir](#dir) -* [noConflict](#noConflict) +* [`memoize`](#memoize) +* [`unmemoize`](#unmemoize) +* [`log`](#log) +* [`dir`](#dir) +* [`noConflict`](#noConflict) ## Collections @@ -150,25 +169,26 @@ So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: ### each(arr, iterator, callback) -Applies an iterator function to each item in an array, in parallel. -The iterator is called with an item from the list and a callback for when it -has finished. If the iterator passes an error to this callback, the main -callback for the each function is immediately called with the error. +Applies the function `iterator` to each item in `arr`, in parallel. +The `iterator` is called with an item from the list, and a callback for when it +has finished. If the `iterator` passes an error to its `callback`, the main +`callback` (for the `each` function) is immediately called with the error. -Note, that since this function applies the iterator to each item in parallel +Note, that since this function applies `iterator` to each item in parallel, there is no guarantee that the iterator functions will complete in order. __Arguments__ -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err) which must be called once it has - completed. If no error has occured, the callback should be run without - arguments or with an explicit null argument. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err)` which must be called once it has + completed. If no error has occured, the `callback` should be run without + arguments or with an explicit `null` argument. +* `callback(err)` - A callback which is called when all `iterator` functions + have finished, or an error occurs. + +__Examples__ -__Example__ ```js // assuming openFiles is an array of file names and saveFile is a function @@ -179,15 +199,43 @@ async.each(openFiles, saveFile, function(err){ }); ``` +```js +// assuming openFiles is an array of file names + +async.each(openFiles, function( file, callback) { + + // Perform operation on file here. + console.log('Processing file ' + file); + + if( file.length > 32 ) { + console.log('This file name is too long'); + callback('File name too long'); + } else { + // Do work to process file here + console.log('File processed'); + callback(); + } +}, function(err){ + // if any of the file processing produced an error, err would equal that error + if( err ) { + // One of the iterations produced an error. + // All processing will now stop. + console.log('A file failed to process'); + } else { + console.log('All files have been processed successfully'); + } +}); +``` + --------------------------------------- ### eachSeries(arr, iterator, callback) -The same as each only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. This means the iterator functions will complete in order. +The same as [`each`](#each), only `iterator` is applied to each item in `arr` in +series. The next `iterator` is only called once the current one has completed. +This means the `iterator` functions will complete in order. --------------------------------------- @@ -196,23 +244,22 @@ processing. This means the iterator functions will complete in order. ### eachLimit(arr, limit, iterator, callback) -The same as each only no more than "limit" iterators will be simultaneously +The same as [`each`](#each), only no more than `limit` `iterator`s will be simultaneously running at any time. -Note that the items are not processed in batches, so there is no guarantee that - the first "limit" iterator functions will complete before any others are -started. +Note that the items in `arr` are not processed in batches, so there is no guarantee that +the first `limit` `iterator` functions will complete before any others are started. __Arguments__ -* arr - An array to iterate over. -* limit - The maximum number of iterators to run at any time. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err) which must be called once it has +* `arr` - An array to iterate over. +* `limit` - The maximum number of `iterator`s to run at any time. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err)` which must be called once it has completed. If no error has occured, the callback should be run without - arguments or with an explicit null argument. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. + arguments or with an explicit `null` argument. +* `callback(err)` - A callback which is called when all `iterator` functions + have finished, or an error occurs. __Example__ @@ -230,26 +277,25 @@ async.eachLimit(documents, 20, requestApi, function(err){ ### map(arr, iterator, callback) -Produces a new array of values by mapping each value in the given array through -the iterator function. The iterator is called with an item from the array and a -callback for when it has finished processing. The callback takes 2 arguments, -an error and the transformed item from the array. If the iterator passes an -error to this callback, the main callback for the map function is immediately -called with the error. +Produces a new array of values by mapping each value in `arr` through +the `iterator` function. The `iterator` is called with an item from `arr` and a +callback for when it has finished processing. Each of these callback takes 2 arguments: +an `error`, and the transformed item from `arr`. If `iterator` passes an error to this +callback, the main `callback` (for the `map` function) is immediately called with the error. -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order, however -the results array will be in the same order as the original array. +Note, that since this function applies the `iterator` to each item in parallel, +there is no guarantee that the `iterator` functions will complete in order. +However, the results array will be in the same order as the original `arr`. __Arguments__ -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, transformed) which must be called once - it has completed with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, transformed)` which must be called once + it has completed with an error (which can be `null`) and a transformed item. +* `callback(err, results)` - A callback which is called when all `iterator` + functions have finished, or an error occurs. Results is an array of the + transformed items from the `arr`. __Example__ @@ -264,9 +310,9 @@ async.map(['file1','file2','file3'], fs.stat, function(err, results){ ### mapSeries(arr, iterator, callback) -The same as map only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. +The same as [`map`](#map), only the `iterator` is applied to each item in `arr` in +series. The next `iterator` is only called once the current one has completed. +The results array will be in the same order as the original. --------------------------------------- @@ -274,53 +320,53 @@ processing. The results array will be in the same order as the original. ### mapLimit(arr, limit, iterator, callback) -The same as map only no more than "limit" iterators will be simultaneously +The same as [`map`](#map), only no more than `limit` `iterator`s will be simultaneously running at any time. -Note that the items are not processed in batches, so there is no guarantee that - the first "limit" iterator functions will complete before any others are -started. +Note that the items are not processed in batches, so there is no guarantee that +the first `limit` `iterator` functions will complete before any others are started. __Arguments__ -* arr - An array to iterate over. -* limit - The maximum number of iterators to run at any time. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, transformed) which must be called once - it has completed with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. +* `arr` - An array to iterate over. +* `limit` - The maximum number of `iterator`s to run at any time. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, transformed)` which must be called once + it has completed with an error (which can be `null`) and a transformed item. +* `callback(err, results)` - A callback which is called when all `iterator` + calls have finished, or an error occurs. The result is an array of the + transformed items from the original `arr`. __Example__ ```js -async.map(['file1','file2','file3'], 1, fs.stat, function(err, results){ +async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){ // results is now an array of stats for each file }); ``` --------------------------------------- + ### filter(arr, iterator, callback) -__Alias:__ select +__Alias:__ `select` -Returns a new array of all the values which pass an async truth test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. This operation is +Returns a new array of all the values in `arr` which pass an async truth test. +_The callback for each `iterator` call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. This operation is performed in parallel, but the results array will be in the same order as the original. __Arguments__ -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in `arr`. + The `iterator` is passed a `callback(truthValue)`, which must be called with a boolean argument once it has completed. -* callback(results) - A callback which is called after all the iterator +* `callback(results)` - A callback which is called after all the `iterator` functions have finished. __Example__ @@ -333,28 +379,29 @@ async.filter(['file1','file2','file3'], fs.exists, function(results){ --------------------------------------- + ### filterSeries(arr, iterator, callback) -__alias:__ selectSeries +__Alias:__ `selectSeries` -The same as filter only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. +The same as [`filter`](#filter) only the `iterator` is applied to each item in `arr` in +series. The next `iterator` is only called once the current one has completed. +The results array will be in the same order as the original. --------------------------------------- ### reject(arr, iterator, callback) -The opposite of filter. Removes values that pass an async truth test. +The opposite of [`filter`](#filter). Removes values that pass an `async` truth test. --------------------------------------- ### rejectSeries(arr, iterator, callback) -The same as reject, only the iterator is applied to each item in the array +The same as [`reject`](#reject), only the `iterator` is applied to each item in `arr` in series. @@ -363,27 +410,28 @@ in series. ### reduce(arr, memo, iterator, callback) -__aliases:__ inject, foldl +__Aliases:__ `inject`, `foldl` + +Reduces `arr` into a single value using an async `iterator` to return +each successive step. `memo` is the initial state of the reduction. +This function only operates in series. -Reduces a list of values into a single value using an async iterator to return -each successive step. Memo is the initial state of the reduction. This -function only operates in series. For performance reasons, it may make sense to -split a call to this function into a parallel map, then use the normal -Array.prototype.reduce on the results. This function is for situations where -each step in the reduction needs to be async, if you can get the data before -reducing it then it's probably a good idea to do so. +For performance reasons, it may make sense to split a call to this function into +a parallel map, and then use the normal `Array.prototype.reduce` on the results. +This function is for situations where each step in the reduction needs to be async; +if you can get the data before reducing it, then it's probably a good idea to do so. __Arguments__ -* arr - An array to iterate over. -* memo - The initial state of the reduction. -* iterator(memo, item, callback) - A function applied to each item in the - array to produce the next step in the reduction. The iterator is passed a - callback(err, reduction) which accepts an optional error as its first +* `arr` - An array to iterate over. +* `memo` - The initial state of the reduction. +* `iterator(memo, item, callback)` - A function applied to each item in the + array to produce the next step in the reduction. The `iterator` is passed a + `callback(err, reduction)` which accepts an optional error as its first argument, and the state of the reduction as the second. If an error is - passed to the callback, the reduction is stopped and the main callback is + passed to the callback, the reduction is stopped and the main `callback` is immediately called with the error. -* callback(err, result) - A callback which is called after all the iterator +* `callback(err, result)` - A callback which is called after all the `iterator` functions have finished. Result is the reduced value. __Example__ @@ -404,9 +452,9 @@ async.reduce([1,2,3], 0, function(memo, item, callback){ ### reduceRight(arr, memo, iterator, callback) -__Alias:__ foldr +__Alias:__ `foldr` -Same as reduce, only operates on the items in the array in reverse order. +Same as [`reduce`](#reduce), only operates on `arr` in reverse order. --------------------------------------- @@ -414,23 +462,23 @@ Same as reduce, only operates on the items in the array in reverse order. ### detect(arr, iterator, callback) -Returns the first value in a list that passes an async truth test. The -iterator is applied in parallel, meaning the first iterator to return true will -fire the detect callback with that result. That means the result might not be -the first item in the original array (in terms of order) that passes the test. +Returns the first value in `arr` that passes an async truth test. The +`iterator` is applied in parallel, meaning the first iterator to return `true` will +fire the detect `callback` with that result. That means the result might not be +the first item in the original `arr` (in terms of order) that passes the test. -If order within the original array is important then look at detectSeries. +If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries). __Arguments__ -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in `arr`. + The iterator is passed a `callback(truthValue)` which must be called with a boolean argument once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be +* `callback(result)` - A callback which is called as soon as any iterator returns + `true`, or after all the `iterator` functions have finished. Result will be the first item in the array that passes the truth test (iterator) or the - value undefined if none passed. + value `undefined` if none passed. __Example__ @@ -445,8 +493,8 @@ async.detect(['file1','file2','file3'], fs.exists, function(result){ ### detectSeries(arr, iterator, callback) -The same as detect, only the iterator is applied to each item in the array -in series. This means the result is always the first in the original array (in +The same as [`detect`](#detect), only the `iterator` is applied to each item in `arr` +in series. This means the result is always the first in the original `arr` (in terms of array order) that passes the truth test. @@ -455,18 +503,18 @@ terms of array order) that passes the truth test. ### sortBy(arr, iterator, callback) -Sorts a list by the results of running each value through an async iterator. +Sorts a list by the results of running each `arr` value through an async `iterator`. __Arguments__ -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, sortValue) which must be called once it - has completed with an error (which can be null) and a value to use as the sort +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, sortValue)` which must be called once it + has completed with an error (which can be `null`) and a value to use as the sort criteria. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is the items from - the original array sorted by the values returned by the iterator calls. +* `callback(err, results)` - A callback which is called after all the `iterator` + functions have finished, or an error occurs. Results is the items from + the original `arr` sorted by the values returned by the `iterator` calls. __Example__ @@ -481,28 +529,48 @@ async.sortBy(['file1','file2','file3'], function(file, callback){ }); ``` +__Sort Order__ + +By modifying the callback parameter the sorting order can be influenced: + +```js +//ascending order +async.sortBy([1,9,3,5], function(x, callback){ + callback(err, x); +}, function(err,result){ + //result callback +} ); + +//descending order +async.sortBy([1,9,3,5], function(x, callback){ + callback(err, x*-1); //<- x*-1 instead of x, turns the order around +}, function(err,result){ + //result callback +} ); +``` + --------------------------------------- ### some(arr, iterator, callback) -__Alias:__ any +__Alias:__ `any` -Returns true if at least one element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. Once any iterator -call returns true, the main callback is immediately called. +Returns `true` if at least one element in the `arr` satisfies an async test. +_The callback for each iterator call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. Once any iterator +call returns `true`, the main `callback` is immediately called. __Arguments__ -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - either true or false depending on the values of the async tests. +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in the array + in parallel. The iterator is passed a callback(truthValue) which must be + called with a boolean argument once it has completed. +* `callback(result)` - A callback which is called as soon as any iterator returns + `true`, or after all the iterator functions have finished. Result will be + either `true` or `false` depending on the values of the async tests. __Example__ @@ -517,21 +585,21 @@ async.some(['file1','file2','file3'], fs.exists, function(result){ ### every(arr, iterator, callback) -__Alias:__ all +__Alias:__ `all` -Returns true if every element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like fs.exists. +Returns `true` if every element in `arr` satisfies an async test. +_The callback for each `iterator` call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. __Arguments__ -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback(truthValue) which must be called with a - boolean argument once it has completed. -* callback(result) - A callback which is called after all the iterator - functions have finished. Result will be either true or false depending on +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in the array + in parallel. The iterator is passed a callback(truthValue) which must be + called with a boolean argument once it has completed. +* `callback(result)` - A callback which is called after all the `iterator` + functions have finished. Result will be either `true` or `false` depending on the values of the async tests. __Example__ @@ -547,20 +615,20 @@ async.every(['file1','file2','file3'], fs.exists, function(result){ ### concat(arr, iterator, callback) -Applies an iterator to each item in a list, concatenating the results. Returns the -concatenated list. The iterators are called in parallel, and the results are +Applies `iterator` to each item in `arr`, concatenating the results. Returns the +concatenated list. The `iterator`s are called in parallel, and the results are concatenated as they return. There is no guarantee that the results array will -be returned in the original order of the arguments passed to the iterator function. +be returned in the original order of `arr` passed to the `iterator` function. __Arguments__ -* arr - An array to iterate over -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback(err, results) which must be called once it - has completed with an error (which can be null) and an array of results. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array containing - the concatenated results of the iterator function. +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, results)` which must be called once it + has completed with an error (which can be `null`) and an array of results. +* `callback(err, results)` - A callback which is called after all the `iterator` + functions have finished, or an error occurs. Results is an array containing + the concatenated results of the `iterator` function. __Example__ @@ -575,7 +643,7 @@ async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ ### concatSeries(arr, iterator, callback) -Same as async.concat, but executes in series instead of parallel. +Same as [`concat`](#concat), but executes in series instead of parallel. ## Control Flow @@ -583,26 +651,33 @@ Same as async.concat, but executes in series instead of parallel. ### series(tasks, [callback]) -Run an array of functions in series, each one running once the previous +Run the functions in the `tasks` array in series, each one running once the previous function has completed. If any functions in the series pass an error to its -callback, no more functions are run and the callback for the series is -immediately called with the value of the error. Once the tasks have completed, -the results are passed to the final callback as an array. +callback, no more functions are run, and `callback` is immediately called with the value of the error. +Otherwise, `callback` receives an array of results when `tasks` have completed. It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object +run as a function, and the results will be passed to the final `callback` as an object instead of an array. This can be a more readable way of handling results from -async.series. +[`series`](#series). + +**Note** that while many implementations preserve the order of object properties, the +[ECMAScript Language Specifcation](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) +explicitly states that + +> The mechanics and order of enumerating the properties is not specified. +So if you rely on the order in which your series of functions are executed, and want +this to work on all platforms, consider using an array. __Arguments__ -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* callback(err, results) - An optional callback to run once all the functions +* `tasks` - An array or object containing functions to run, each function is passed + a `callback(err, result)` it must call on completion with an error `err` (which can + be `null`) and an optional `result` value. +* `callback(err, results)` - An optional callback to run once all the functions have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. + the result arguments passed to the `task` callbacks. __Example__ @@ -646,24 +721,24 @@ function(err, results) { ### parallel(tasks, [callback]) -Run an array of functions in parallel, without waiting until the previous +Run the `tasks` array of functions in parallel, without waiting until the previous function has completed. If any of the functions pass an error to its -callback, the main callback is immediately called with the value of the error. -Once the tasks have completed, the results are passed to the final callback as an +callback, the main `callback` is immediately called with the value of the error. +Once the `tasks` have completed, the results are passed to the final `callback` as an array. It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object +run as a function and the results will be passed to the final `callback` as an object instead of an array. This can be a more readable way of handling results from -async.parallel. +[`parallel`](#parallel). __Arguments__ -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* callback(err, results) - An optional callback to run once all the functions +* `tasks` - An array or object containing functions to run. Each function is passed + a `callback(err, result)` which it must call on completion with an error `err` + (which can be `null`) and an optional `result` value. +* `callback(err, results)` - An optional callback to run once all the functions have completed. This function gets a results array (or object) containing all the result arguments passed to the task callbacks. @@ -709,41 +784,41 @@ function(err, results) { --------------------------------------- - + ### parallelLimit(tasks, limit, [callback]) -The same as parallel only the tasks are executed in parallel with a maximum of "limit" -tasks executing at any time. +The same as [`parallel`](#parallel), only `tasks` are executed in parallel +with a maximum of `limit` tasks executing at any time. -Note that the tasks are not executed in batches, so there is no guarantee that -the first "limit" tasks will complete before any others are started. +Note that the `tasks` are not executed in batches, so there is no guarantee that +the first `limit` tasks will complete before any others are started. __Arguments__ -* tasks - An array or object containing functions to run, each function is passed - a callback(err, result) it must call on completion with an error (which can - be null) and an optional result value. -* limit - The maximum number of tasks to run at any time. -* callback(err, results) - An optional callback to run once all the functions +* `tasks` - An array or object containing functions to run, each function is passed + a `callback(err, result)` it must call on completion with an error `err` (which can + be `null`) and an optional `result` value. +* `limit` - The maximum number of `tasks` to run at any time. +* `callback(err, results)` - An optional callback to run once all the functions have completed. This function gets a results array (or object) containing all - the result arguments passed to the task callbacks. + the result arguments passed to the `task` callbacks. --------------------------------------- ### whilst(test, fn, callback) -Repeatedly call fn, while test returns true. Calls the callback when stopped, +Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped, or an error occurs. __Arguments__ -* test() - synchronous truth test to perform before each execution of fn. -* fn(callback) - A function to call each time the test passes. The function is - passed a callback(err) which must be called once it has completed with an - optional error argument. -* callback(err) - A callback which is called after the test fails and repeated - execution of fn has stopped. +* `test()` - synchronous truth test to perform before each execution of `fn`. +* `fn(callback)` - A function which is called each time `test` passes. The function is + passed a `callback(err)`, which must be called once it has completed with an + optional `err` argument. +* `callback(err)` - A callback which is called after the test fails and repeated + execution of `fn` has stopped. __Example__ @@ -767,51 +842,69 @@ async.whilst( ### doWhilst(fn, test, callback) -The post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. +The post-check version of [`whilst`](#whilst). To reflect the difference in +the order of operations, the arguments `test` and `fn` are switched. + +`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. --------------------------------------- ### until(test, fn, callback) -Repeatedly call fn, until test returns true. Calls the callback when stopped, +Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped, or an error occurs. -The inverse of async.whilst. +The inverse of [`whilst`](#whilst). --------------------------------------- ### doUntil(fn, test, callback) -Like doWhilst except the test is inverted. Note the argument ordering differs from `until`. +Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`. --------------------------------------- -### forever(fn, callback) +### forever(fn, errback) + +Calls the asynchronous function `fn` with a callback parameter that allows it to +call itself again, in series, indefinitely. -Calls the asynchronous function 'fn' repeatedly, in series, indefinitely. -If an error is passed to fn's callback then 'callback' is called with the -error, otherwise it will never be called. +If an error is passed to the callback then `errback` is called with the +error, and execution stops, otherwise it will never be called. + +```js +async.forever( + function(next) { + // next is suitable for passing to things that need a callback(err [, whatever]); + // it will result in this function being called again. + }, + function(err) { + // if next is called with a value in its first parameter, it will appear + // in here as 'err', and execution will stop. + } +); +``` --------------------------------------- ### waterfall(tasks, [callback]) -Runs an array of functions in series, each passing their results to the next in -the array. However, if any of the functions pass an error to the callback, the -next function is not executed and the main callback is immediately called with +Runs the `tasks` array of functions in series, each passing their results to the next in +the array. However, if any of the `tasks` pass an error to their own callback, the +next function is not executed, and the main `callback` is immediately called with the error. __Arguments__ -* tasks - An array of functions to run, each function is passed a - callback(err, result1, result2, ...) it must call on completion. The first - argument is an error (which can be null) and any further arguments will be +* `tasks` - An array of functions to run, each function is passed a + `callback(err, result1, result2, ...)` it must call on completion. The first + argument is an error (which can be `null`) and any further arguments will be passed as arguments in order to the next task. -* callback(err, [results]) - An optional callback to run once all the functions +* `callback(err, [results])` - An optional callback to run once all the functions have completed. This will be passed the results of the last task's callback. @@ -824,6 +917,7 @@ async.waterfall([ callback(null, 'one', 'two'); }, function(arg1, arg2, callback){ + // arg1 now equals 'one' and arg2 now equals 'two' callback(null, 'three'); }, function(arg1, callback){ @@ -841,14 +935,14 @@ async.waterfall([ Creates a function which is a composition of the passed asynchronous functions. Each function consumes the return value of the function that -follows. Composing functions f(), g() and h() would produce the result of -f(g(h())), only this version uses callbacks to obtain the return values. +follows. Composing functions `f()`, `g()`, and `h()` would produce the result of +`f(g(h()))`, only this version uses callbacks to obtain the return values. Each function is executed with the `this` binding of the composed function. __Arguments__ -* functions... - the asynchronous functions to compose +* `functions...` - the asynchronous functions to compose __Example__ @@ -873,20 +967,67 @@ add1mul3(4, function (err, result) { }); ``` +--------------------------------------- + +### seq(fn1, fn2...) + +Version of the compose function that is more natural to read. +Each following function consumes the return value of the latter function. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* functions... - the asynchronous functions to compose + + +__Example__ + +```js +// Requires lodash (or underscore), express3 and dresende's orm2. +// Part of an app, that fetches cats of the logged user. +// This example uses `seq` function to avoid overnesting and error +// handling clutter. +app.get('/cats', function(request, response) { + function handleError(err, data, callback) { + if (err) { + console.error(err); + response.json({ status: 'error', message: err.message }); + } + else { + callback(data); + } + } + var User = request.models.User; + async.seq( + _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) + handleError, + function(user, fn) { + user.getCats(fn); // 'getCats' has signature (callback(err, data)) + }, + handleError, + function(cats) { + response.json({ status: 'ok', message: 'Cats found', data: cats }); + } + )(req.session.user_id); + } +}); +``` + --------------------------------------- ### applyEach(fns, args..., callback) -Applies the provided arguments to each function in the array, calling the -callback after all functions have completed. If you only provide the first -argument then it will return a function which lets you pass in the +Applies the provided arguments to each function in the array, calling +`callback` after all functions have completed. If you only provide the first +argument, then it will return a function which lets you pass in the arguments as if it were a single function call. __Arguments__ -* fns - the asynchronous functions to all call with the same arguments -* args... - any number of separate arguments to pass to the function -* callback - the final argument should be the callback, called when all +* `fns` - the asynchronous functions to all call with the same arguments +* `args...` - any number of separate arguments to pass to the function +* `callback` - the final argument should be the callback, called when all functions have completed processing @@ -908,42 +1049,50 @@ async.each( ### applyEachSeries(arr, iterator, callback) -The same as applyEach only the functions are applied in series. +The same as [`applyEach`](#applyEach) only the functions are applied in series. --------------------------------------- ### queue(worker, concurrency) -Creates a queue object with the specified concurrency. Tasks added to the -queue will be processed in parallel (up to the concurrency limit). If all -workers are in progress, the task is queued until one is available. Once -a worker has completed a task, the task's callback is called. +Creates a `queue` object with the specified `concurrency`. Tasks added to the +`queue` are processed in parallel (up to the `concurrency` limit). If all +`worker`s are in progress, the task is queued until one becomes available. +Once a `worker` completes a `task`, that `task`'s callback is called. __Arguments__ -* worker(task, callback) - An asynchronous function for processing a queued - task, which must call its callback(err) argument when finished, with an - optional error as an argument. -* concurrency - An integer for determining how many worker functions should be +* `worker(task, callback)` - An asynchronous function for processing a queued + task, which must call its `callback(err)` argument when finished, with an + optional `error` as an argument. +* `concurrency` - An `integer` for determining how many `worker` functions should be run in parallel. __Queue objects__ -The queue object returned by this function has the following properties and +The `queue` object returned by this function has the following properties and methods: -* length() - a function returning the number of items waiting to be processed. -* concurrency - an integer for determining how many worker functions should be - run in parallel. This property can be changed after a queue is created to +* `length()` - a function returning the number of items waiting to be processed. +* `started` - a function returning whether or not any items have been pushed and processed by the queue +* `running()` - a function returning the number of items currently being processed. +* `idle()` - a function returning false if there are items waiting or being processed, or true if not. +* `concurrency` - an integer for determining how many `worker` functions should be + run in parallel. This property can be changed after a `queue` is created to alter the concurrency on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* unshift(task, [callback]) - add a new task to the front of the queue. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker +* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once + the `worker` has finished processing the task. Instead of a single task, a `tasks` array + can be submitted. The respective callback is used for every task in the list. +* `unshift(task, [callback])` - add a new task to the front of the `queue`. +* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit, + and further tasks will be queued. +* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`. +* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`. +* `paused` - a boolean for determining whether the queue is in a paused state +* `pause()` - a function that pauses the processing of tasks until `resume()` is called. +* `resume()` - a function that resumes the processing of queued tasks when the queue is paused. +* `kill()` - a function that empties remaining tasks from the queue forcing it to go idle. __Example__ @@ -983,39 +1132,56 @@ q.unshift({name: 'bar'}, function (err) { }); ``` + +--------------------------------------- + + +### priorityQueue(worker, concurrency) + +The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects: + +* `push(task, priority, [callback])` - `priority` should be a number. If an array of + `tasks` is given, all tasks will be assigned the same priority. +* The `unshift` method was removed. + --------------------------------------- ### cargo(worker, [payload]) -Creates a cargo object with the specified payload. Tasks added to the -cargo will be processed altogether (up to the payload limit). If the -worker is in progress, the task is queued until it is available. Once -the worker has completed some tasks, each callback of those tasks is called. +Creates a `cargo` object with the specified payload. Tasks added to the +cargo will be processed altogether (up to the `payload` limit). If the +`worker` is in progress, the task is queued until it becomes available. Once +the `worker` has completed some tasks, each callback of those tasks is called. +Check out [this animation](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) for how `cargo` and `queue` work. + +While [queue](#queue) passes only one task to one of a group of workers +at a time, cargo passes an array of tasks to a single worker, repeating +when the worker is finished. __Arguments__ -* worker(tasks, callback) - An asynchronous function for processing an array of - queued tasks, which must call its callback(err) argument when finished, with - an optional error as an argument. -* payload - An optional integer for determining how many tasks should be +* `worker(tasks, callback)` - An asynchronous function for processing an array of + queued tasks, which must call its `callback(err)` argument when finished, with + an optional `err` argument. +* `payload` - An optional `integer` for determining how many tasks should be processed per round; if omitted, the default is unlimited. __Cargo objects__ -The cargo object returned by this function has the following properties and +The `cargo` object returned by this function has the following properties and methods: -* length() - a function returning the number of items waiting to be processed. -* payload - an integer for determining how many tasks should be - process per round. This property can be changed after a cargo is created to +* `length()` - A function returning the number of items waiting to be processed. +* `payload` - An `integer` for determining how many tasks should be + process per round. This property can be changed after a `cargo` is created to alter the payload on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker +* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called + once the `worker` has finished processing the task. Instead of a single task, an array of `tasks` + can be submitted. The respective callback is used for every task in the list. +* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued. +* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`. +* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`. __Example__ @@ -1048,33 +1214,36 @@ cargo.push({name: 'baz'}, function (err) { ### auto(tasks, [callback]) -Determines the best order for running functions based on their requirements. -Each function can optionally depend on other functions being completed first, -and each function is run as soon as its requirements are satisfied. If any of -the functions pass an error to their callback, that function will not complete -(so any other functions depending on it will not run) and the main callback -will be called immediately with the error. Functions also receive an object -containing the results of functions which have completed so far. +Determines the best order for running the functions in `tasks`, based on their +requirements. Each function can optionally depend on other functions being completed +first, and each function is run as soon as its requirements are satisfied. + +If any of the functions pass an error to their callback, it will not +complete (so any other functions depending on it will not run), and the main +`callback` is immediately called with the error. Functions also receive an +object containing the results of functions which have completed so far. + +Note, all functions are called with a `results` object as a second argument, +so it is unsafe to pass functions in the `tasks` object which cannot handle the +extra argument. -Note, all functions are called with a results object as a second argument, -so it is unsafe to pass functions in the tasks object which cannot handle the -extra argument. For example, this snippet of code: +For example, this snippet of code: ```js async.auto({ - readData: async.apply(fs.readFile, 'data.txt', 'utf-8'); + readData: async.apply(fs.readFile, 'data.txt', 'utf-8') }, callback); ``` -will have the effect of calling readFile with the results object as the last +will have the effect of calling `readFile` with the results object as the last argument, which will fail: ```js fs.readFile('data.txt', 'utf-8', cb, {}); ``` -Instead, wrap the call to readFile in a function which does not forward the -results object: +Instead, wrap the call to `readFile` in a function which does not forward the +`results` object: ```js async.auto({ @@ -1086,40 +1255,51 @@ async.auto({ __Arguments__ -* tasks - An object literal containing named functions or an array of - requirements, with the function itself the last item in the array. The key - used for each function or array is used when specifying requirements. The - function receives two arguments: (1) a callback(err, result) which must be - called when finished, passing an error (which can be null) and the result of - the function's execution, and (2) a results object, containing the results of +* `tasks` - An object. Each of its properties is either a function or an array of + requirements, with the function itself the last item in the array. The object's key + of a property serves as the name of the task defined by that property, + i.e. can be used when specifying requirements for other tasks. + The function receives two arguments: (1) a `callback(err, result)` which must be + called when finished, passing an `error` (which can be `null`) and the result of + the function's execution, and (2) a `results` object, containing the results of the previously executed functions. -* callback(err, results) - An optional callback which is called when all the - tasks have been completed. The callback will receive an error as an argument - if any tasks pass an error to their callback. Results will always be passed - but if an error occurred, no other tasks will be performed, and the results - object will only contain partial results. - +* `callback(err, results)` - An optional callback which is called when all the + tasks have been completed. It receives the `err` argument if any `tasks` + pass an error to their callback. Results are always returned; however, if + an error occurs, no further `tasks` will be performed, and the results + object will only contain partial results. + __Example__ ```js async.auto({ get_data: function(callback){ + console.log('in get_data'); // async code to get some data + callback(null, 'data', 'converted to array'); }, make_folder: function(callback){ + console.log('in make_folder'); // async code to create a directory to store a file in // this is run at the same time as getting the data + callback(null, 'folder'); }, - write_file: ['get_data', 'make_folder', function(callback){ + write_file: ['get_data', 'make_folder', function(callback, results){ + console.log('in write_file', JSON.stringify(results)); // once there is some data and the directory exists, // write the data to a file in the directory - callback(null, filename); + callback(null, 'filename'); }], email_link: ['write_file', function(callback, results){ + console.log('in email_link', JSON.stringify(results)); // once the file is written let's email a link to it... // results.write_file contains the filename returned by write_file. + callback(null, {'file':results.write_file, 'email':'user@example.com'}); }] +}, function(err, results) { + console.log('err = ', err); + console.log('results = ', results); }); ``` @@ -1129,28 +1309,79 @@ series functions would look like this: ```js async.parallel([ function(callback){ + console.log('in get_data'); // async code to get some data + callback(null, 'data', 'converted to array'); }, function(callback){ + console.log('in make_folder'); // async code to create a directory to store a file in // this is run at the same time as getting the data + callback(null, 'folder'); } ], function(err, results){ async.series([ function(callback){ + console.log('in write_file', JSON.stringify(results)); // once there is some data and the directory exists, // write the data to a file in the directory + results.push('filename'); + callback(null); }, function(callback){ + console.log('in email_link', JSON.stringify(results)); // once the file is written let's email a link to it... + callback(null, {'file':results.pop(), 'email':'user@example.com'}); } ]); }); ``` -For a complicated series of async tasks using the auto function makes adding -new tasks much easier and makes the code more readable. +For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding +new tasks much easier (and the code more readable). + + +--------------------------------------- + + +### retry([times = 5], task, [callback]) + +Attempts to get a successful response from `task` no more than `times` times before +returning an error. If the task is successful, the `callback` will be passed the result +of the successfull task. If all attemps fail, the callback will be passed the error and +result (if any) of the final attempt. + +__Arguments__ + +* `times` - An integer indicating how many times to attempt the `task` before giving up. Defaults to 5. +* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)` + which must be called when finished, passing `err` (which can be `null`) and the `result` of + the function's execution, and (2) a `results` object, containing the results of + the previously executed functions (if nested inside another control flow). +* `callback(err, results)` - An optional callback which is called when the + task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`. + +The [`retry`](#retry) function can be used as a stand-alone control flow by passing a +callback, as shown below: + +```js +async.retry(3, apiMethod, function(err, result) { + // do something with the result +}); +``` + +It can also be embeded within other control flow functions to retry individual methods +that are not as reliable, like this: + +```js +async.auto({ + users: api.getUsers.bind(api), + payments: async.retry(3, api.getPayments.bind(api)) +}, function(err, results) { + // do something with the results +}); +``` --------------------------------------- @@ -1158,16 +1389,16 @@ new tasks much easier and makes the code more readable. ### iterator(tasks) -Creates an iterator function which calls the next function in the array, +Creates an iterator function which calls the next function in the `tasks` array, returning a continuation to call the next one after that. It's also possible to -'peek' the next iterator by doing iterator.next(). +“peek” at the next iterator with `iterator.next()`. -This function is used internally by the async module but can be useful when +This function is used internally by the `async` module, but can be useful when you want to manually control the flow of functions in series. __Arguments__ -* tasks - An array of functions to run. +* `tasks` - An array of functions to run. __Example__ @@ -1194,15 +1425,16 @@ node> nextfn(); ### apply(function, arguments..) -Creates a continuation function with some arguments already applied, a useful -shorthand when combined with other control flow functions. Any arguments +Creates a continuation function with some arguments already applied. + +Useful as a shorthand when combined with other control flow functions. Any arguments passed to the returned function are added to the arguments originally passed to apply. __Arguments__ -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to automatically apply when the +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to automatically apply when the continuation is called. __Example__ @@ -1244,16 +1476,16 @@ three ### nextTick(callback) -Calls the callback on a later loop around the event loop. In node.js this just -calls process.nextTick, in the browser it falls back to setImmediate(callback) -if available, otherwise setTimeout(callback, 0), which means other higher priority -events may precede the execution of the callback. +Calls `callback` on a later loop around the event loop. In Node.js this just +calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)` +if available, otherwise `setTimeout(callback, 0)`, which means other higher priority +events may precede the execution of `callback`. This is used internally for browser-compatibility purposes. __Arguments__ -* callback - The function to call on a later loop around the event loop. +* `callback` - The function to call on a later loop around the event loop. __Example__ @@ -1269,13 +1501,13 @@ call_order.push('one') ### times(n, callback) -Calls the callback n times and accumulates results in the same manner -you would use with async.map. +Calls the `callback` function `n` times, and accumulates results in the same manner +you would use with [`map`](#map). __Arguments__ -* n - The number of times to run the function. -* callback - The function to call n times. +* `n` - The number of times to run the function. +* `callback` - The function to call `n` times. __Example__ @@ -1299,9 +1531,9 @@ async.times(5, function(n, next){ ### timesSeries(n, callback) -The same as times only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. +The same as [`times`](#times), only the iterator is applied to each item in `arr` in +series. The next `iterator` is only called once the current one has completed. +The results array will be in the same order as the original. ## Utils @@ -1309,7 +1541,7 @@ processing. The results array will be in the same order as the original. ### memoize(fn, [hasher]) -Caches the results of an async function. When creating a hash to store function +Caches the results of an `async` function. When creating a hash to store function results against, the callback is omitted from the hash and an optional hash function can be used. @@ -1318,9 +1550,9 @@ by `memoize`. __Arguments__ -* fn - the function you to proxy and cache results from. -* hasher - an optional function for generating a custom hash for storing - results, it has all the arguments applied to it apart from the callback, and +* `fn` - The function to proxy and cache results from. +* `hasher` - Tn optional function for generating a custom hash for storing + results. It has all the arguments applied to it apart from the callback, and must be synchronous. __Example__ @@ -1341,25 +1573,25 @@ fn('some name', function () { ### unmemoize(fn) -Undoes a memoized function, reverting it to the original, unmemoized -form. Comes handy in tests. +Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized +form. Handy for testing. __Arguments__ -* fn - the memoized function +* `fn` - the memoized function ### log(function, arguments) -Logs the result of an async function to the console. Only works in node.js or -in browsers that support console.log and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.log is +Logs the result of an `async` function to the `console`. Only works in Node.js or +in browsers that support `console.log` and `console.error` (such as FF and Chrome). +If multiple arguments are returned from the async function, `console.log` is called on each argument in order. __Arguments__ -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to apply to the function. __Example__ @@ -1380,16 +1612,16 @@ node> async.log(hello, 'world'); ### dir(function, arguments) -Logs the result of an async function to the console using console.dir to -display the properties of the resulting object. Only works in node.js or -in browsers that support console.dir and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.dir is +Logs the result of an `async` function to the `console` using `console.dir` to +display the properties of the resulting object. Only works in Node.js or +in browsers that support `console.dir` and `console.error` (such as FF and Chrome). +If multiple arguments are returned from the async function, `console.dir` is called on each argument in order. __Arguments__ -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to apply to the function. __Example__ @@ -1410,5 +1642,5 @@ node> async.dir(hello, 'world'); ### noConflict() -Changes the value of async back to its original value, returning a reference to the -async object. +Changes the value of `async` back to its original value, returning a reference to the +`async` object. diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js index cb6320d6ad..01e8afcc4f 100755 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js @@ -1,3 +1,11 @@ +/*! + * async + * https://github.com/caolan/async + * + * Copyright 2010-2014 Caolan McMahon + * Released under the MIT license + */ +/*jshint onevar: false, indent:4 */ /*global setImmediate: false, setTimeout: false, console: false */ (function () { @@ -27,6 +35,12 @@ //// cross-browser compatiblity functions //// + var _toString = Object.prototype.toString; + + var _isArray = Array.isArray || function (obj) { + return _toString.call(obj) === '[object Array]'; + }; + var _each = function (arr, iterator) { if (arr.forEach) { return arr.forEach(iterator); @@ -91,7 +105,10 @@ else { async.nextTick = process.nextTick; if (typeof setImmediate !== 'undefined') { - async.setImmediate = setImmediate; + async.setImmediate = function (fn) { + // not a direct alias for IE10 compatibility + setImmediate(fn); + }; } else { async.setImmediate = async.nextTick; @@ -105,19 +122,20 @@ } var completed = 0; _each(arr, function (x) { - iterator(x, only_once(function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed >= arr.length) { - callback(null); - } - } - })); + iterator(x, only_once(done) ); }); + function done(err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed >= arr.length) { + callback(); + } + } + } }; async.forEach = async.each; @@ -136,7 +154,7 @@ else { completed += 1; if (completed >= arr.length) { - callback(null); + callback(); } else { iterate(); @@ -216,18 +234,26 @@ var _asyncMap = function (eachfn, arr, iterator, callback) { - var results = []; arr = _map(arr, function (x, i) { return {index: i, value: x}; }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); + if (!callback) { + eachfn(arr, function (x, callback) { + iterator(x.value, function (err) { + callback(err); + }); }); - }, function (err) { - callback(err, results); - }); + } else { + var results = []; + eachfn(arr, function (x, callback) { + iterator(x.value, function (err, v) { + results[x.index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } }; async.map = doParallel(_asyncMap); async.mapSeries = doSeries(_asyncMap); @@ -393,8 +419,9 @@ async.auto = function (tasks, callback) { callback = callback || function () {}; var keys = _keys(tasks); - if (!keys.length) { - return callback(null); + var remainingTasks = keys.length + if (!remainingTasks) { + return callback(); } var results = {}; @@ -412,20 +439,24 @@ } }; var taskComplete = function () { + remainingTasks-- _each(listeners.slice(0), function (fn) { fn(); }); }; addListener(function () { - if (_keys(results).length === keys.length) { - callback(null, results); + if (!remainingTasks) { + var theCallback = callback; + // prevent final callback from calling itself if it errors callback = function () {}; + + theCallback(null, results); } }); _each(keys, function (k) { - var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; + var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]]; var taskCallback = function (err) { var args = Array.prototype.slice.call(arguments, 1); if (args.length <= 1) { @@ -467,9 +498,40 @@ }); }; + async.retry = function(times, task, callback) { + var DEFAULT_TIMES = 5; + var attempts = []; + // Use defaults if times not passed + if (typeof times === 'function') { + callback = task; + task = times; + times = DEFAULT_TIMES; + } + // Make sure times is a number + times = parseInt(times, 10) || DEFAULT_TIMES; + var wrappedTask = function(wrappedCallback, wrappedResults) { + var retryAttempt = function(task, finalAttempt) { + return function(seriesCallback) { + task(function(err, result){ + seriesCallback(!err || finalAttempt, {err: err, result: result}); + }, wrappedResults); + }; + }; + while (times) { + attempts.push(retryAttempt(task, !(times-=1))); + } + async.series(attempts, function(done, data){ + data = data[data.length - 1]; + (wrappedCallback || callback)(data.err, data.result); + }); + } + // If a callback is passed, run this as a controll flow + return callback ? wrappedTask() : wrappedTask + }; + async.waterfall = function (tasks, callback) { callback = callback || function () {}; - if (tasks.constructor !== Array) { + if (!_isArray(tasks)) { var err = new Error('First argument to waterfall must be an array of functions'); return callback(err); } @@ -502,7 +564,7 @@ var _parallel = function(eachfn, tasks, callback) { callback = callback || function () {}; - if (tasks.constructor === Array) { + if (_isArray(tasks)) { eachfn.map(tasks, function (fn, callback) { if (fn) { fn(function (err) { @@ -542,7 +604,7 @@ async.series = function (tasks, callback) { callback = callback || function () {}; - if (tasks.constructor === Array) { + if (_isArray(tasks)) { async.mapSeries(tasks, function (fn, callback) { if (fn) { fn(function (err) { @@ -630,7 +692,8 @@ if (err) { return callback(err); } - if (test()) { + var args = Array.prototype.slice.call(arguments, 1); + if (test.apply(null, args)) { async.doWhilst(iterator, test, callback); } else { @@ -658,7 +721,8 @@ if (err) { return callback(err); } - if (!test()) { + var args = Array.prototype.slice.call(arguments, 1); + if (!test.apply(null, args)) { async.doUntil(iterator, test, callback); } else { @@ -672,9 +736,20 @@ concurrency = 1; } function _insert(q, data, pos, callback) { - if(data.constructor !== Array) { + if (!q.started){ + q.started = true; + } + if (!_isArray(data)) { data = [data]; } + if(data.length == 0) { + // call drain immediately if there are no tasks + return async.setImmediate(function() { + if (q.drain) { + q.drain(); + } + }); + } _each(data, function(task) { var item = { data: task, @@ -687,7 +762,7 @@ q.tasks.push(item); } - if (q.saturated && q.tasks.length === concurrency) { + if (q.saturated && q.tasks.length === q.concurrency) { q.saturated(); } async.setImmediate(q.process); @@ -701,14 +776,20 @@ saturated: null, empty: null, drain: null, + started: false, + paused: false, push: function (data, callback) { _insert(q, data, false, callback); }, + kill: function () { + q.drain = null; + q.tasks = []; + }, unshift: function (data, callback) { _insert(q, data, true, callback); }, process: function () { - if (workers < q.concurrency && q.tasks.length) { + if (!q.paused && workers < q.concurrency && q.tasks.length) { var task = q.tasks.shift(); if (q.empty && q.tasks.length === 0) { q.empty(); @@ -733,10 +814,88 @@ }, running: function () { return workers; + }, + idle: function() { + return q.tasks.length + workers === 0; + }, + pause: function () { + if (q.paused === true) { return; } + q.paused = true; + q.process(); + }, + resume: function () { + if (q.paused === false) { return; } + q.paused = false; + q.process(); } }; return q; }; + + async.priorityQueue = function (worker, concurrency) { + + function _compareTasks(a, b){ + return a.priority - b.priority; + }; + + function _binarySearch(sequence, item, compare) { + var beg = -1, + end = sequence.length - 1; + while (beg < end) { + var mid = beg + ((end - beg + 1) >>> 1); + if (compare(item, sequence[mid]) >= 0) { + beg = mid; + } else { + end = mid - 1; + } + } + return beg; + } + + function _insert(q, data, priority, callback) { + if (!q.started){ + q.started = true; + } + if (!_isArray(data)) { + data = [data]; + } + if(data.length == 0) { + // call drain immediately if there are no tasks + return async.setImmediate(function() { + if (q.drain) { + q.drain(); + } + }); + } + _each(data, function(task) { + var item = { + data: task, + priority: priority, + callback: typeof callback === 'function' ? callback : null + }; + + q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item); + + if (q.saturated && q.tasks.length === q.concurrency) { + q.saturated(); + } + async.setImmediate(q.process); + }); + } + + // Start with a normal queue + var q = async.queue(worker, concurrency); + + // Override push to accept second parameter representing priority + q.push = function (data, priority, callback) { + _insert(q, data, priority, callback); + }; + + // Remove unshift function + delete q.unshift; + + return q; + }; async.cargo = function (worker, payload) { var working = false, @@ -748,8 +907,9 @@ saturated: null, empty: null, drain: null, + drained: true, push: function (data, callback) { - if(data.constructor !== Array) { + if (!_isArray(data)) { data = [data]; } _each(data, function(task) { @@ -757,6 +917,7 @@ data: task, callback: typeof callback === 'function' ? callback : null }); + cargo.drained = false; if (cargo.saturated && tasks.length === payload) { cargo.saturated(); } @@ -766,13 +927,14 @@ process: function process() { if (working) return; if (tasks.length === 0) { - if(cargo.drain) cargo.drain(); + if(cargo.drain && !cargo.drained) cargo.drain(); + cargo.drained = true; return; } var ts = typeof payload === 'number' ? tasks.splice(0, payload) - : tasks.splice(0); + : tasks.splice(0, tasks.length); var ds = _map(ts, function (task) { return task.data; @@ -840,7 +1002,9 @@ var callback = args.pop(); var key = hasher.apply(null, args); if (key in memo) { - callback.apply(null, memo[key]); + async.nextTick(function () { + callback.apply(null, memo[key]); + }); } else if (key in queues) { queues[key].push(callback); @@ -884,8 +1048,8 @@ return async.mapSeries(counter, iterator, callback); }; - async.compose = function (/* functions... */) { - var fns = Array.prototype.reverse.call(arguments); + async.seq = function (/* functions... */) { + var fns = arguments; return function () { var that = this; var args = Array.prototype.slice.call(arguments); @@ -903,6 +1067,10 @@ }; }; + async.compose = function (/* functions... */) { + return async.seq.apply(null, Array.prototype.reverse.call(arguments)); + }; + var _applyEach = function (eachfn, fns /*args...*/) { var go = function () { var that = this; @@ -937,16 +1105,16 @@ next(); }; + // Node.js + if (typeof module !== 'undefined' && module.exports) { + module.exports = async; + } // AMD / RequireJS - if (typeof define !== 'undefined' && define.amd) { + else if (typeof define !== 'undefined' && define.amd) { define([], function () { return async; }); } - // Node.js - else if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } // included directly via \n\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\n* [map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n\n\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8');\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", "homepage": "https://github.com/caolan/async", - "_id": "async@0.2.9", - "_from": "async@~0.2.9" + "_id": "async@0.9.0", + "dist": { + "shasum": "ac3613b1da9bed1b47510bb4651b8931e47146c7", + "tarball": "http://registry.npmjs.org/async/-/async-0.9.0.tgz" + }, + "_from": "async@~0.9.0", + "_npmVersion": "1.4.3", + "_npmUser": { + "name": "caolan", + "email": "caolan.mcmahon@gmail.com" + }, + "maintainers": [ + { + "name": "caolan", + "email": "caolan@caolanmcmahon.com" + } + ], + "directories": {}, + "_shasum": "ac3613b1da9bed1b47510bb4651b8931e47146c7", + "_resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore deleted file mode 100644 index aba34f0127..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -*.un~ -/node_modules -/test/tmp diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile deleted file mode 100644 index b4ff85a33b..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -.PHONY: test - diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md index 1a9999eb0e..8043cb48ab 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/Readme.md @@ -1,4 +1,4 @@ -# combined-stream +# combined-stream [![Build Status](https://travis-ci.org/felixge/node-combined-stream.svg?branch=master)](https://travis-ci.org/felixge/node-combined-stream) A stream that emits multiple other streams one after another. @@ -70,19 +70,19 @@ Returns a new combined stream object. Available options are: The effect of those options is described below. -### combinedStream.pauseStreams = true +### combinedStream.pauseStreams = `true` Whether to apply back pressure to the underlaying streams. If set to `false`, the underlaying streams will never be paused. If set to `true`, the underlaying streams will be paused right after being appended, as well as when `delayedStream.pipe()` wants to throttle. -### combinedStream.maxDataSize = 2 * 1024 * 1024 +### combinedStream.maxDataSize = `2 * 1024 * 1024` The maximum amount of bytes (or characters) to buffer for all source streams. If this value is exceeded, `combinedStream` emits an `'error'` event. -### combinedStream.dataSize = 0 +### combinedStream.dataSize = `0` The amount of bytes (or characters) currently buffered by `combinedStream`. diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js index 32849fd109..c18ad980d9 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/lib/combined_stream.js @@ -62,6 +62,7 @@ CombinedStream.prototype.append = function(stream) { CombinedStream.prototype.pipe = function(dest, options) { Stream.prototype.pipe.call(this, dest, options); this.resume(); + return dest; }; CombinedStream.prototype._getNext = function() { diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json index 38341b8a08..cbafd00ee7 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json @@ -21,11 +21,22 @@ "fake": "0.2.0", "far": "0.0.1" }, - "readme": "# delayed-stream\n\nBuffers events from a stream until you are ready to handle them.\n\n## Installation\n\n``` bash\nnpm install delayed-stream\n```\n\n## Usage\n\nThe following example shows how to write a http echo server that delays its\nresponse by 1000 ms.\n\n``` javascript\nvar DelayedStream = require('delayed-stream');\nvar http = require('http');\n\nhttp.createServer(function(req, res) {\n var delayed = DelayedStream.create(req);\n\n setTimeout(function() {\n res.writeHead(200);\n delayed.pipe(res);\n }, 1000);\n});\n```\n\nIf you are not using `Stream#pipe`, you can also manually release the buffered\nevents by calling `delayedStream.resume()`:\n\n``` javascript\nvar delayed = DelayedStream.create(req);\n\nsetTimeout(function() {\n // Emit all buffered events and resume underlaying source\n delayed.resume();\n}, 1000);\n```\n\n## Implementation\n\nIn order to use this meta stream properly, here are a few things you should\nknow about the implementation.\n\n### Event Buffering / Proxying\n\nAll events of the `source` stream are hijacked by overwriting the `source.emit`\nmethod. Until node implements a catch-all event listener, this is the only way.\n\nHowever, delayed-stream still continues to emit all events it captures on the\n`source`, regardless of whether you have released the delayed stream yet or\nnot.\n\nUpon creation, delayed-stream captures all `source` events and stores them in\nan internal event buffer. Once `delayedStream.release()` is called, all\nbuffered events are emitted on the `delayedStream`, and the event buffer is\ncleared. After that, delayed-stream merely acts as a proxy for the underlaying\nsource.\n\n### Error handling\n\nError events on `source` are buffered / proxied just like any other events.\nHowever, `delayedStream.create` attaches a no-op `'error'` listener to the\n`source`. This way you only have to handle errors on the `delayedStream`\nobject, rather than in two places.\n\n### Buffer limits\n\ndelayed-stream provides a `maxDataSize` property that can be used to limit\nthe amount of data being buffered. In order to protect you from bad `source`\nstreams that don't react to `source.pause()`, this feature is enabled by\ndefault.\n\n## API\n\n### DelayedStream.create(source, [options])\n\nReturns a new `delayedStream`. Available options are:\n\n* `pauseStream`\n* `maxDataSize`\n\nThe description for those properties can be found below.\n\n### delayedStream.source\n\nThe `source` stream managed by this object. This is useful if you are\npassing your `delayedStream` around, and you still want to access properties\non the `source` object.\n\n### delayedStream.pauseStream = true\n\nWhether to pause the underlaying `source` when calling\n`DelayedStream.create()`. Modifying this property afterwards has no effect.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature. You can also modify this property during runtime.\n\n### delayedStream.maxDataSize = 1024 * 1024\n\nThe amount of data to buffer before emitting an `error`.\n\nIf the underlaying source is emitting `Buffer` objects, the `maxDataSize`\nrefers to bytes.\n\nIf the underlaying source is emitting JavaScript strings, the size refers to\ncharacters.\n\nIf you know what you are doing, you can set this property to `Infinity` to\ndisable this feature.\n\n### delayedStream.dataSize = 0\n\nThe amount of data buffered so far.\n\n### delayedStream.readable\n\nAn ECMA5 getter that returns the value of `source.readable`.\n\n### delayedStream.resume()\n\nIf the `delayedStream` has not been released so far, `delayedStream.release()`\nis called.\n\nIn either case, `source.resume()` is called.\n\n### delayedStream.pause()\n\nCalls `source.pause()`.\n\n### delayedStream.pipe(dest)\n\nCalls `delayedStream.resume()` and then proxies the arguments to `source.pipe`.\n\n### delayedStream.release()\n\nEmits and clears all events that have been buffered up so far. This does not\nresume the underlaying source, use `delayedStream.resume()` instead.\n\n## License\n\ndelayed-stream is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", + "_id": "delayed-stream@0.0.5", + "_engineSupported": true, + "_npmVersion": "1.0.3", + "_nodeVersion": "v0.4.9-pre", + "_defaultsLoaded": true, + "dist": { + "shasum": "d4b1f43a93e8296dfe02694f4680bc37a313c73f", + "tarball": "http://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz" + }, + "scripts": {}, + "directories": {}, + "_shasum": "d4b1f43a93e8296dfe02694f4680bc37a313c73f", + "_from": "delayed-stream@0.0.5", + "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz", "bugs": { "url": "https://github.com/felixge/node-delayed-stream/issues" }, - "_id": "delayed-stream@0.0.5", - "_from": "delayed-stream@0.0.5" + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json index 0dd4141622..37c37314cc 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json @@ -6,27 +6,56 @@ }, "name": "combined-stream", "description": "A stream that emits multiple other streams one after another.", - "version": "0.0.4", + "version": "0.0.5", "homepage": "https://github.com/felixge/node-combined-stream", "repository": { "type": "git", "url": "git://github.com/felixge/node-combined-stream.git" }, "main": "./lib/combined_stream", + "scripts": { + "test": "node test/run.js" + }, "engines": { - "node": "*" + "node": ">= 0.8" }, "dependencies": { "delayed-stream": "0.0.5" }, "devDependencies": { - "far": "0.0.1" + "far": "~0.0.7" }, - "readme": "# combined-stream\n\nA stream that emits multiple other streams one after another.\n\n## Installation\n\n``` bash\nnpm install combined-stream\n```\n\n## Usage\n\nHere is a simple example that shows how you can use combined-stream to combine\ntwo files into one:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nWhile the example above works great, it will pause all source streams until\nthey are needed. If you don't want that to happen, you can set `pauseStreams`\nto `false`:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create({pauseStreams: false});\ncombinedStream.append(fs.createReadStream('file1.txt'));\ncombinedStream.append(fs.createReadStream('file2.txt'));\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\nHowever, what if you don't have all the source streams yet, or you don't want\nto allocate the resources (file descriptors, memory, etc.) for them right away?\nWell, in that case you can simply provide a callback that supplies the stream\nby calling a `next()` function:\n\n``` javascript\nvar CombinedStream = require('combined-stream');\nvar fs = require('fs');\n\nvar combinedStream = CombinedStream.create();\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file1.txt'));\n});\ncombinedStream.append(function(next) {\n next(fs.createReadStream('file2.txt'));\n});\n\ncombinedStream.pipe(fs.createWriteStream('combined.txt'));\n```\n\n## API\n\n### CombinedStream.create([options])\n\nReturns a new combined stream object. Available options are:\n\n* `maxDataSize`\n* `pauseStreams`\n\nThe effect of those options is described below.\n\n### combinedStream.pauseStreams = true\n\nWhether to apply back pressure to the underlaying streams. If set to `false`,\nthe underlaying streams will never be paused. If set to `true`, the\nunderlaying streams will be paused right after being appended, as well as when\n`delayedStream.pipe()` wants to throttle.\n\n### combinedStream.maxDataSize = 2 * 1024 * 1024\n\nThe maximum amount of bytes (or characters) to buffer for all source streams.\nIf this value is exceeded, `combinedStream` emits an `'error'` event.\n\n### combinedStream.dataSize = 0\n\nThe amount of bytes (or characters) currently buffered by `combinedStream`.\n\n### combinedStream.append(stream)\n\nAppends the given `stream` to the combinedStream object. If `pauseStreams` is\nset to `true, this stream will also be paused right away.\n\n`streams` can also be a function that takes one parameter called `next`. `next`\nis a function that must be invoked in order to provide the `next` stream, see\nexample above.\n\nRegardless of how the `stream` is appended, combined-stream always attaches an\n`'error'` listener to it, so you don't have to do that manually.\n\nSpecial case: `stream` can also be a String or Buffer.\n\n### combinedStream.write(data)\n\nYou should not call this, `combinedStream` takes care of piping the appended\nstreams into itself for you.\n\n### combinedStream.resume()\n\nCauses `combinedStream` to start drain the streams it manages. The function is\nidempotent, and also emits a `'resume'` event each time which usually goes to\nthe stream that is currently being drained.\n\n### combinedStream.pause();\n\nIf `combinedStream.pauseStreams` is set to `false`, this does nothing.\nOtherwise a `'pause'` event is emitted, this goes to the stream that is\ncurrently being drained, so you can use it to apply back pressure.\n\n### combinedStream.end();\n\nSets `combinedStream.writable` to false, emits an `'end'` event, and removes\nall streams from the queue.\n\n### combinedStream.destroy();\n\nSame as `combinedStream.end()`, except it emits a `'close'` event instead of\n`'end'`.\n\n## License\n\ncombined-stream is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", + "gitHead": "19d9bdd4c20f6806c2ae8adb00a53fb6fd154740", "bugs": { "url": "https://github.com/felixge/node-combined-stream/issues" }, - "_id": "combined-stream@0.0.4", - "_from": "combined-stream@~0.0.4" + "_id": "combined-stream@0.0.5", + "_shasum": "29ed76e5c9aad07c4acf9ca3d32601cce28697a2", + "_from": "combined-stream@~0.0.4", + "_npmVersion": "1.4.14", + "_npmUser": { + "name": "alexindigo", + "email": "iam@alexindigo.com" + }, + "maintainers": [ + { + "name": "felixge", + "email": "felix@debuggable.com" + }, + { + "name": "celer", + "email": "celer@scrypt.net" + }, + { + "name": "alexindigo", + "email": "iam@alexindigo.com" + } + ], + "dist": { + "shasum": "29ed76e5c9aad07c4acf9ca3d32601cce28697a2", + "tarball": "http://registry.npmjs.org/combined-stream/-/combined-stream-0.0.5.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.5.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js deleted file mode 100644 index 81543485e0..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/common.js +++ /dev/null @@ -1,23 +0,0 @@ -var common = module.exports; - -var path = require('path'); -var fs = require('fs'); -var root = path.join(__dirname, '..'); - -common.dir = { - fixture: root + '/test/fixture', - tmp: root + '/test/tmp', -}; - -// Create tmp directory if it does not exist -// Not using fs.exists so as to be node 0.6.x compatible -try { - fs.statSync(common.dir.tmp); -} -catch (e) { - // Dir does not exist - fs.mkdirSync(common.dir.tmp); -} - -common.CombinedStream = require(root); -common.assert = require('assert'); diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt deleted file mode 100644 index 50e0218df4..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file1.txt +++ /dev/null @@ -1,256 +0,0 @@ -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 -10101010101010101010101010101010101010101010101010101010101010101010101010101010 -01010101010101010101010101010101010101010101010101010101010101010101010101010101 diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt deleted file mode 100644 index da1d821fe8..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/fixture/file2.txt +++ /dev/null @@ -1,256 +0,0 @@ -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 -20202020202020202020202020202020202020202020202020202020202020202020202020202020 -02020202020202020202020202020202020202020202020202020202020202020202020202020202 diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js deleted file mode 100644 index 44ecabab69..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-callback-streams.js +++ /dev/null @@ -1,27 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(function(next) { - next(fs.createReadStream(FILE1)); - }); - combinedStream.append(function(next) { - next(fs.createReadStream(FILE2)); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('end', function() { - var written = fs.readFileSync(tmpFile, 'utf8'); - assert.strictEqual(written, EXPECTED); - }); -})(); diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js deleted file mode 100644 index e3fbd1842f..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-data-size.js +++ /dev/null @@ -1,34 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; - -(function testDataSizeGetter() { - var combinedStream = CombinedStream.create(); - - assert.strictEqual(combinedStream.dataSize, 0); - - // Test one stream - combinedStream._streams.push({dataSize: 10}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 10); - - // Test two streams - combinedStream._streams.push({dataSize: 23}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); - - // Test currentStream - combinedStream._currentStream = {dataSize: 20}; - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 53); - - // Test currentStream without dataSize - combinedStream._currentStream = {}; - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); - - // Test stream function - combinedStream._streams.push(function() {}); - combinedStream._updateDataSize(); - assert.strictEqual(combinedStream.dataSize, 33); -})(); diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js deleted file mode 100644 index c678575c07..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams-and-buffers-and-strings.js +++ /dev/null @@ -1,38 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var BUFFER = new Buffer('Bacon is delicious'); -var FILE2 = common.dir.fixture + '/file2.txt'; -var STRING = 'The € kicks the $\'s ass!'; - -var EXPECTED = - fs.readFileSync(FILE1) - + BUFFER - + fs.readFileSync(FILE2) - + STRING; -var GOT; - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(BUFFER); - combinedStream.append(fs.createReadStream(FILE2)); - combinedStream.append(function(next) { - next(STRING); - }); - - var tmpFile = common.dir.tmp + '/combined-file1-buffer-file2-string.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('close', function() { - GOT = fs.readFileSync(tmpFile, 'utf8'); - }); -})(); - -process.on('exit', function() { - assert.strictEqual(GOT, EXPECTED); -}); diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js deleted file mode 100644 index 263cfdf722..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-delayed-streams.js +++ /dev/null @@ -1,35 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); -var GOT; - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create(); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var stream1 = combinedStream._streams[0]; - var stream2 = combinedStream._streams[1]; - - stream1.on('end', function() { - assert.equal(stream2.dataSize, 0); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('close', function() { - GOT = fs.readFileSync(tmpFile, 'utf8'); - }); -})(); - -process.on('exit', function() { - console.error(GOT.length, EXPECTED.length); - assert.strictEqual(GOT, EXPECTED); -}); diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js deleted file mode 100644 index c3d288d013..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-empty-string.js +++ /dev/null @@ -1,39 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var util = require('util'); -var Stream = require('stream').Stream; - -var s = CombinedStream.create(); - - -function StringStream(){ - this.writable=true; - this.str="" -} -util.inherits(StringStream,Stream); - -StringStream.prototype.write=function(chunk,encoding){ - this.str+=chunk.toString(); - this.emit('data',chunk); -} - -StringStream.prototype.end=function(chunk,encoding){ - this.emit('end'); -} - -StringStream.prototype.toString=function(){ - return this.str; -} - - -s.append("foo."); -s.append(""); -s.append("bar"); - -var ss = new StringStream(); - -s.pipe(ss); -s.resume(); - -assert.equal(ss.toString(),"foo.bar"); diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js deleted file mode 100644 index aefa36e6b7..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-is-stream-like.js +++ /dev/null @@ -1,17 +0,0 @@ -var fs = require('fs'); -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var FILE1 = common.dir.fixture + '/file1.txt'; -var fileStream = fs.createReadStream(FILE1); - -var foo = function(){}; - -(function testIsStreamLike() { - assert(! CombinedStream.isStreamLike(true)); - assert(! CombinedStream.isStreamLike("I am a string")); - assert(! CombinedStream.isStreamLike(7)); - assert(! CombinedStream.isStreamLike(foo)); - - assert(CombinedStream.isStreamLike(fileStream)); -})(); \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js deleted file mode 100644 index 25f47a47c3..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-max-data-size.js +++ /dev/null @@ -1,24 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create({pauseStreams: false, maxDataSize: 20736}); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var gotErr = null; - combinedStream.on('error', function(err) { - gotErr = err; - }); - - process.on('exit', function() { - assert.ok(gotErr); - assert.ok(gotErr.message.match(/bytes/)); - }); -})(); diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js deleted file mode 100644 index 30a3a6f84e..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/integration/test-unpaused-streams.js +++ /dev/null @@ -1,30 +0,0 @@ -var common = require('../common'); -var assert = common.assert; -var CombinedStream = common.CombinedStream; -var fs = require('fs'); - -var FILE1 = common.dir.fixture + '/file1.txt'; -var FILE2 = common.dir.fixture + '/file2.txt'; -var EXPECTED = fs.readFileSync(FILE1) + fs.readFileSync(FILE2); - -(function testDelayedStreams() { - var combinedStream = CombinedStream.create({pauseStreams: false}); - combinedStream.append(fs.createReadStream(FILE1)); - combinedStream.append(fs.createReadStream(FILE2)); - - var stream1 = combinedStream._streams[0]; - var stream2 = combinedStream._streams[1]; - - stream1.on('end', function() { - assert.ok(stream2.dataSize > 0); - }); - - var tmpFile = common.dir.tmp + '/combined.txt'; - var dest = fs.createWriteStream(tmpFile); - combinedStream.pipe(dest); - - dest.on('end', function() { - var written = fs.readFileSync(tmpFile, 'utf8'); - assert.strictEqual(written, EXPECTED); - }); -})(); diff --git a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js deleted file mode 100755 index 0bb8e82241..0000000000 --- a/deps/npm/node_modules/request/node_modules/form-data/node_modules/combined-stream/test/run.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var far = require('far').create(); - -far.add(__dirname); -far.include(/test-.*\.js$/); - -far.execute(); diff --git a/deps/npm/node_modules/request/node_modules/mime/LICENSE b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/LICENSE similarity index 100% rename from deps/npm/node_modules/request/node_modules/mime/LICENSE rename to deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/LICENSE diff --git a/deps/npm/node_modules/request/node_modules/mime/README.md b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/README.md similarity index 100% rename from deps/npm/node_modules/request/node_modules/mime/README.md rename to deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/README.md diff --git a/deps/npm/node_modules/request/node_modules/mime/mime.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/mime.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/mime/mime.js rename to deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/mime.js diff --git a/deps/npm/node_modules/request/node_modules/mime/package.json b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/package.json similarity index 82% rename from deps/npm/node_modules/request/node_modules/mime/package.json rename to deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/package.json index a975939218..259822b788 100644 --- a/deps/npm/node_modules/request/node_modules/mime/package.json +++ b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/package.json @@ -30,7 +30,29 @@ "bugs": { "url": "https://github.com/broofa/node-mime/issues" }, - "homepage": "https://github.com/broofa/node-mime", "_id": "mime@1.2.11", - "_from": "mime@~1.2.9" + "dist": { + "shasum": "58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10", + "tarball": "http://registry.npmjs.org/mime/-/mime-1.2.11.tgz" + }, + "_from": "mime@~1.2.11", + "_npmVersion": "1.3.6", + "_npmUser": { + "name": "broofa", + "email": "robert@broofa.com" + }, + "maintainers": [ + { + "name": "broofa", + "email": "robert@broofa.com" + }, + { + "name": "bentomas", + "email": "benjamin@benjaminthomas.org" + } + ], + "directories": {}, + "_shasum": "58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10", + "_resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz", + "homepage": "https://github.com/broofa/node-mime" } diff --git a/deps/npm/node_modules/request/node_modules/mime/test.js b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/test.js similarity index 100% rename from deps/npm/node_modules/request/node_modules/mime/test.js rename to deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/test.js diff --git a/deps/npm/node_modules/request/node_modules/mime/types/mime.types b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/types/mime.types similarity index 100% rename from deps/npm/node_modules/request/node_modules/mime/types/mime.types rename to deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/types/mime.types diff --git a/deps/npm/node_modules/request/node_modules/mime/types/node.types b/deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/types/node.types similarity index 100% rename from deps/npm/node_modules/request/node_modules/mime/types/node.types rename to deps/npm/node_modules/request/node_modules/form-data/node_modules/mime/types/node.types diff --git a/deps/npm/node_modules/request/node_modules/form-data/package.json b/deps/npm/node_modules/request/node_modules/form-data/package.json index 8e5d325622..afda8b6c30 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/package.json +++ b/deps/npm/node_modules/request/node_modules/form-data/package.json @@ -6,7 +6,7 @@ }, "name": "form-data", "description": "A module to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", - "version": "0.1.2", + "version": "0.1.4", "repository": { "type": "git", "url": "git://github.com/felixge/node-form-data.git" @@ -16,12 +16,12 @@ "test": "node test/run.js" }, "engines": { - "node": ">= 0.6" + "node": ">= 0.8" }, "dependencies": { "combined-stream": "~0.0.4", "mime": "~1.2.11", - "async": "~0.2.9" + "async": "~0.9.0" }, "licenses": [ { @@ -33,14 +33,48 @@ "fake": "~0.2.2", "far": "~0.0.7", "formidable": "~1.0.14", - "request": "~2.27.0" + "request": "~2.36.0" }, - "readme": "# Form-Data [![Build Status](https://travis-ci.org/felixge/node-form-data.png?branch=master)](https://travis-ci.org/felixge/node-form-data) [![Dependency Status](https://gemnasium.com/felixge/node-form-data.png)](https://gemnasium.com/felixge/node-form-data)\n\nA module to create readable ```\"multipart/form-data\"``` streams. Can be used to submit forms and file uploads to other web applications.\n\nThe API of this module is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd].\n\n[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface\n[streams2-thing]: http://nodejs.org/api/stream.html#stream_compatibility_with_older_node_versions\n\n## Install\n\n```\nnpm install form-data\n```\n\n## Usage\n\nIn this example we are constructing a form with 3 fields that contain a string,\na buffer and a file stream.\n\n``` javascript\nvar FormData = require('form-data');\nvar fs = require('fs');\n\nvar form = new FormData();\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_file', fs.createReadStream('/foo/bar.jpg'));\n```\n\nAlso you can use http-response stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar http = require('http');\n\nvar form = new FormData();\n\nhttp.request('http://nodejs.org/images/logo.png', function(response) {\n form.append('my_field', 'my value');\n form.append('my_buffer', new Buffer(10));\n form.append('my_logo', response);\n});\n```\n\nOr @mikeal's request stream:\n\n``` javascript\nvar FormData = require('form-data');\nvar request = require('request');\n\nvar form = new FormData();\n\nform.append('my_field', 'my value');\nform.append('my_buffer', new Buffer(10));\nform.append('my_logo', request('http://nodejs.org/images/logo.png'));\n```\n\nIn order to submit this form to a web application, call ```submit(url, [callback])``` method:\n\n``` javascript\nform.submit('http://example.org/', function(err, res) {\n // res – response object (http.IncomingMessage) //\n res.resume(); // for node-0.10.x\n});\n\n```\n\nFor more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods.\n\n### Alternative submission methods\n\nYou can use node's http client interface:\n\n``` javascript\nvar http = require('http');\n\nvar request = http.request({\n method: 'post',\n host: 'example.org',\n path: '/upload',\n headers: form.getHeaders()\n});\n\nform.pipe(request);\n\nrequest.on('response', function(res) {\n console.log(res.statusCode);\n});\n```\n\nOr if you would prefer the `'Content-Length'` header to be set for you:\n\n``` javascript\nform.submit('example.org/upload', function(err, res) {\n console.log(res.statusCode);\n});\n```\n\nTo use custom headers and pre-known length in parts:\n\n``` javascript\nvar CRLF = '\\r\\n';\nvar form = new FormData();\n\nvar options = {\n header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF,\n knownLength: 1\n};\n\nform.append('my_buffer', buffer, options);\n\nform.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n});\n```\n\nForm-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide \"file\"-related information manually:\n\n``` javascript\nsomeModule.stream(function(err, stdout, stderr) {\n if (err) throw err;\n\n var form = new FormData();\n\n form.append('file', stdout, {\n filename: 'unicycle.jpg',\n contentType: 'image/jpg',\n knownLength: 19806\n });\n\n form.submit('http://example.com/', function(err, res) {\n if (err) throw err;\n console.log('Done');\n });\n});\n```\n\nFor edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter:\n\n``` javascript\nform.submit({\n host: 'example.com',\n path: '/probably.php?extra=params',\n auth: 'username:password'\n}, function(err, res) {\n console.log(res.statusCode);\n});\n```\n\n## Notes\n\n- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround.\n- If it feels like FormData hangs after submit and you're on ```node-0.10```, please check [Compatibility with Older Node Versions][streams2-thing]\n\n## TODO\n\n- Add new streams (0.10) support and try really hard not to break it for 0.8.x.\n\n## License\n\nForm-Data is licensed under the MIT license.\n", - "readmeFilename": "Readme.md", + "gitHead": "5f5f4809ea685f32658809fa0f13d7eface0e45a", "bugs": { "url": "https://github.com/felixge/node-form-data/issues" }, "homepage": "https://github.com/felixge/node-form-data", - "_id": "form-data@0.1.2", - "_from": "form-data@~0.1.0" + "_id": "form-data@0.1.4", + "_shasum": "91abd788aba9702b1aabfa8bc01031a2ac9e3b12", + "_from": "form-data@~0.1.0", + "_npmVersion": "1.4.14", + "_npmUser": { + "name": "alexindigo", + "email": "iam@alexindigo.com" + }, + "maintainers": [ + { + "name": "felixge", + "email": "felix@debuggable.com" + }, + { + "name": "idralyuk", + "email": "igor@buran.us" + }, + { + "name": "alexindigo", + "email": "iam@alexindigo.com" + }, + { + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" + }, + { + "name": "celer", + "email": "dtyree77@gmail.com" + } + ], + "dist": { + "shasum": "91abd788aba9702b1aabfa8bc01031a2ac9e3b12", + "tarball": "http://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.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 77ba16cb05..b3bb517630 100644 --- a/deps/npm/node_modules/request/node_modules/hawk/.npmignore +++ b/deps/npm/node_modules/request/node_modules/hawk/.npmignore @@ -1,18 +1,18 @@ -.idea -*.iml -npm-debug.log -dump.rdb -node_modules -results.tap -results.xml -npm-shrinkwrap.json -config.json -.DS_Store -*/.DS_Store -*/*/.DS_Store -._* -*/._* -*/*/._* -coverage.* -lib-cov - +.idea +*.iml +npm-debug.log +dump.rdb +node_modules +results.tap +results.xml +npm-shrinkwrap.json +config.json +.DS_Store +*/.DS_Store +*/*/.DS_Store +._* +*/._* +*/*/._* +coverage.* +lib-cov + diff --git a/deps/npm/node_modules/request/node_modules/hawk/.travis.yml b/deps/npm/node_modules/request/node_modules/hawk/.travis.yml index 047f7e3d5e..40ca59eeeb 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/README.md b/deps/npm/node_modules/request/node_modules/hawk/README.md index 010bac6d01..36312f4feb 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/README.md +++ b/deps/npm/node_modules/request/node_modules/hawk/README.md @@ -548,11 +548,9 @@ and suggestions. ### Where can I find **Hawk** implementations in other languages? -**Hawk**'s only reference implementation is provided in JavaScript as a node.js module. However, others are actively porting it to other -platforms. There is already a [PHP](https://github.com/alexbilbie/PHP-Hawk), -[.NET](https://github.com/pcibraro/hawknet), and [JAVA](https://github.com/wealdtech/hawk) libraries available. The full list -is maintained [here](https://github.com/hueniverse/hawk/issues?labels=port). Please add an issue if you are working on another -port. A cross-platform test-suite is in the works. +**Hawk**'s only reference implementation is provided in JavaScript as a node.js module. However, it has been ported to other languages. +The full list is maintained [here](https://github.com/hueniverse/hawk/issues?labels=port&state=closed). Please add an issue if you are +working on another port. A cross-platform test-suite is in the works. ### Why isn't the algorithm part of the challenge or dynamically negotiated? diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js b/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js index 27494f23f9..1ff0cd3286 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js +++ b/deps/npm/node_modules/request/node_modules/hawk/lib/browser.js @@ -24,17 +24,17 @@ hawk.client = { uri: 'http://example.com/resource?a=b' method: HTTP verb (e.g. 'GET', 'POST') options: { - + // Required - + credentials: { id: 'dh37fgj492je', key: 'aoijedoaijsdlaksjdl', algorithm: 'sha256' // 'sha1', 'sha256' }, - + // Optional - + ext: 'application-specific', // Application specific data sent via the ext attribute timestamp: Date.now() / 1000, // A pre-calculated timestamp in seconds nonce: '2334f34f', // A pre-generated nonce @@ -60,6 +60,7 @@ hawk.client = { !method || typeof method !== 'string' || !options || typeof options !== 'object') { + result.err = 'Invalid argument type'; return result; } @@ -75,11 +76,12 @@ hawk.client = { !credentials.key || !credentials.algorithm) { - // Invalid credential object + result.err = 'Invalid credential object'; return result; } if (hawk.crypto.algorithms.indexOf(credentials.algorithm) === -1) { + result.err = 'Unknown algorithm'; return result; } @@ -267,6 +269,20 @@ hawk.client = { }; return result; + }, + + authenticateTimestamp: function (message, credentials, updateClock) { // updateClock defaults to true + + var tsm = hawk.crypto.calculateTsMac(message.ts, credentials); + if (tsm !== message.tsm) { + return false; + } + + if (updateClock !== false) { + hawk.utils.setNtpOffset(message.ts - Math.floor(Date.now() / 1000)); // Keep offset at 1 second precision + } + + return true; } }; @@ -351,7 +367,13 @@ hawk.utils = { setNtpOffset: function (offset) { - hawk.utils.storage.setItem('hawk_ntp_offset', offset); + try { + hawk.utils.storage.setItem('hawk_ntp_offset', offset); + } + catch (err) { + console.error('[hawk] could not write to storage.'); + console.error(err); + } }, getNtpOffset: function () { diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/client.js b/deps/npm/node_modules/request/node_modules/hawk/lib/client.js index 41984582a2..1002a9d517 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/lib/client.js +++ b/deps/npm/node_modules/request/node_modules/hawk/lib/client.js @@ -54,6 +54,7 @@ exports.header = function (uri, method, options) { !method || typeof method !== 'string' || !options || typeof options !== 'object') { + result.err = 'Invalid argument type'; return result; } @@ -69,11 +70,12 @@ exports.header = function (uri, method, options) { !credentials.key || !credentials.algorithm) { - // Invalid credential object + result.err = 'Invalid credential object'; return result; } if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) { + result.err = 'Unknown algorithm'; return result; } @@ -156,6 +158,8 @@ exports.authenticate = function (res, credentials, artifacts, options) { return false; } + // Validate server timestamp (not used to update clock since it is done via the SNPT client) + if (attributes.ts) { var tsm = Crypto.calculateTsMac(attributes.ts, credentials); if (tsm !== attributes.tsm) { diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/crypto.js b/deps/npm/node_modules/request/node_modules/hawk/lib/crypto.js index 150340a336..9825c7d88f 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/lib/crypto.js +++ b/deps/npm/node_modules/request/node_modules/hawk/lib/crypto.js @@ -109,3 +109,10 @@ exports.calculateTsMac = function (ts, credentials) { return hmac.digest('base64'); }; + +exports.timestampMessage = function (credentials, localtimeOffsetMsec) { + + var now = Math.floor((Utils.now() + (localtimeOffsetMsec || 0)) / 1000); + var tsm = exports.calculateTsMac(now, credentials); + return { ts: now, tsm: tsm }; +}; diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/index.js b/deps/npm/node_modules/request/node_modules/hawk/lib/index.js index 1d713cb61a..a883882c8c 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/lib/index.js +++ b/deps/npm/node_modules/request/node_modules/hawk/lib/index.js @@ -2,6 +2,7 @@ exports.error = exports.Error = require('boom'); exports.sntp = require('sntp'); + exports.server = require('./server'); exports.client = require('./client'); exports.crypto = require('./crypto'); @@ -12,4 +13,3 @@ exports.uri = { getBewit: exports.client.getBewit }; - diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/server.js b/deps/npm/node_modules/request/node_modules/hawk/lib/server.js index 478c47b397..59464ed024 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/lib/server.js +++ b/deps/npm/node_modules/request/node_modules/hawk/lib/server.js @@ -191,9 +191,8 @@ exports.authenticate = function (req, credentialsFunc, options, callback) { // Check timestamp staleness if (Math.abs((attributes.ts * 1000) - now) > (options.timestampSkewSec * 1000)) { - var fresh = Math.floor((Utils.now() + (options.localtimeOffsetMsec || 0)) / 1000); // Get fresh now - var tsm = Crypto.calculateTsMac(fresh, credentials); - return callback(Boom.unauthorized('Stale timestamp', 'Hawk', { ts: fresh, tsm: tsm }), credentials, artifacts); + var tsm = Crypto.timestampMessage(credentials, options.localtimeOffsetMsec); + return callback(Boom.unauthorized('Stale timestamp', 'Hawk', tsm), credentials, artifacts); } // Successful authentication diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json index c57a11a393..2406a49a5d 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/package.json @@ -36,12 +36,29 @@ "url": "http://github.com/spumko/boom/raw/master/LICENSE" } ], - "readme": "\n![boom Logo](https://raw.github.com/spumko/boom/master/images/boom.png)\n\nHTTP-friendly error objects\n\n[![Build Status](https://secure.travis-ci.org/spumko/boom.png)](http://travis-ci.org/spumko/boom)\n", - "readmeFilename": "README.md", + "_id": "boom@0.4.2", + "dist": { + "shasum": "7a636e9ded4efcefb19cef4947a3c67dfaee911b", + "tarball": "http://registry.npmjs.org/boom/-/boom-0.4.2.tgz" + }, + "_from": "boom@0.4.x", + "_npmVersion": "1.2.18", + "_npmUser": { + "name": "hueniverse", + "email": "eran@hueniverse.com" + }, + "maintainers": [ + { + "name": "hueniverse", + "email": "eran@hueniverse.com" + } + ], + "directories": {}, + "_shasum": "7a636e9ded4efcefb19cef4947a3c67dfaee911b", + "_resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz", "bugs": { "url": "https://github.com/spumko/boom/issues" }, - "homepage": "https://github.com/spumko/boom", - "_id": "boom@0.4.2", - "_from": "boom@0.4.x" + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/spumko/boom" } diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json index cc1f73938a..c4cd1b2342 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json @@ -37,12 +37,29 @@ "url": "http://github.com/hueniverse/cryptiles/raw/master/LICENSE" } ], - "readme": "cryptiles\n=========\n\nGeneral purpose crypto utilities\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/cryptiles.png)](http://travis-ci.org/hueniverse/cryptiles)\n", - "readmeFilename": "README.md", "bugs": { "url": "https://github.com/hueniverse/cryptiles/issues" }, - "homepage": "https://github.com/hueniverse/cryptiles", "_id": "cryptiles@0.2.2", - "_from": "cryptiles@0.2.x" + "dist": { + "shasum": "ed91ff1f17ad13d3748288594f8a48a0d26f325c", + "tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz" + }, + "_from": "cryptiles@0.2.x", + "_npmVersion": "1.2.24", + "_npmUser": { + "name": "hueniverse", + "email": "eran@hueniverse.com" + }, + "maintainers": [ + { + "name": "hueniverse", + "email": "eran@hueniverse.com" + } + ], + "directories": {}, + "_shasum": "ed91ff1f17ad13d3748288594f8a48a0d26f325c", + "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz", + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/hueniverse/cryptiles" } diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json index e18f14859f..4e4eb74b7a 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/package.json @@ -38,12 +38,33 @@ "url": "http://github.com/spumko/hoek/raw/master/LICENSE" } ], - "readme": "\r\n![hoek Logo](https://raw.github.com/spumko/hoek/master/images/hoek.png)\r\n\r\nGeneral purpose node utilities\r\n\r\n[![Build Status](https://secure.travis-ci.org/spumko/hoek.png)](http://travis-ci.org/spumko/hoek)\r\n\r\n# Table of Contents\r\n\r\n* [Introduction](#introduction \"Introduction\")\r\n* [Object](#object \"Object\")\r\n * [clone](#cloneobj \"clone\")\r\n * [merge](#mergetarget-source-isnulloverride-ismergearrays \"merge\")\r\n * [applyToDefaults](#applytodefaultsdefaults-options \"applyToDefaults\")\r\n * [unique](#uniquearray-key \"unique\")\r\n * [mapToObject](#maptoobjectarray-key \"mapToObject\")\r\n * [intersect](#intersectarray1-array2 \"intersect\")\r\n * [matchKeys](#matchkeysobj-keys \"matchKeys\")\r\n * [flatten](#flattenarray-target \"flatten\")\r\n * [removeKeys](#removekeysobject-keys \"removeKeys\")\r\n * [reach](#reachobj-chain \"reach\")\r\n * [inheritAsync](#inheritasyncself-obj-keys \"inheritAsync\")\r\n * [rename](#renameobj-from-to \"rename\")\r\n* [Timer](#timer \"Timer\")\r\n* [Binary Encoding/Decoding](#binary \"Binary Encoding/Decoding\")\r\n * [base64urlEncode](#binary64urlEncodevalue \"binary64urlEncode\")\r\n * [base64urlDecode](#binary64urlDecodevalue \"binary64urlDecode\")\r\n* [Escaping Characters](#escaped \"Escaping Characters\")\r\n * [escapeHtml](#escapeHtmlstring \"escapeHtml\")\r\n * [escapeHeaderAttribute](#escapeHeaderAttributeattribute \"escapeHeaderAttribute\")\r\n * [escapeRegex](#escapeRegexstring \"escapeRegex\")\r\n* [Errors](#errors \"Errors\")\r\n * [assert](#assertmessage \"assert\")\r\n * [abort](#abortmessage \"abort\")\r\n * [displayStack](#displayStackslice \"displayStack\")\r\n * [callStack](#callStackslice \"callStack\")\r\n * [toss](#tosscondition \"toss\")\r\n* [Load files](#load-files \"Load Files\")\r\n * [loadPackage](#loadPackagedir \"loadpackage\")\r\n * [loadDirModules](#loadDirModulespath-excludefiles-target \"loaddirmodules\")\r\n\r\n\r\n\r\n# Introduction\r\n\r\nThe *Hoek* general purpose node utilities library is used to aid in a variety of manners. It comes with useful methods for Arrays (clone, merge, applyToDefaults), Objects (removeKeys, copy), Asserting and more. \r\n\r\nFor example, to use Hoek to set configuration with default options:\r\n```javascript\r\nvar Hoek = require('hoek');\r\n\r\nvar default = {url : \"www.github.com\", port : \"8000\", debug : true}\r\n\r\nvar config = Hoek.applyToDefaults(default, {port : \"3000\", admin : true});\r\n\r\n// In this case, config would be { url: 'www.github.com', port: '3000', debug: true, admin: true }\r\n```\r\n\r\nUnder each of the sections (such as Array), there are subsections which correspond to Hoek methods. Each subsection will explain how to use the corresponding method. In each js excerpt below, the var Hoek = require('hoek') is omitted for brevity.\r\n\r\n## Object\r\n\r\nHoek provides several helpful methods for objects and arrays.\r\n\r\n### clone(obj)\r\n\r\nThis method is used to clone an object or an array. A *deep copy* is made (duplicates everything, including values that are objects). \r\n\r\n```javascript\r\n\r\nvar nestedObj = {\r\n w: /^something$/ig,\r\n x: {\r\n a: [1, 2, 3],\r\n b: 123456,\r\n c: new Date()\r\n },\r\n y: 'y',\r\n z: new Date()\r\n };\r\n\r\nvar copy = Hoek.clone(nestedObj);\r\n\r\ncopy.x.b = 100;\r\n\r\nconsole.log(copy.y) // results in 'y'\r\nconsole.log(nestedObj.x.b) // results in 123456\r\nconsole.log(copy.x.b) // results in 100\r\n```\r\n\r\n### merge(target, source, isNullOverride, isMergeArrays)\r\nisNullOverride, isMergeArrays default to true\r\n\r\nMerge all the properties of source into target, source wins in conflic, and by default null and undefined from source are applied\r\n\r\n\r\n```javascript\r\n\r\nvar target = {a: 1, b : 2}\r\nvar source = {a: 0, c: 5}\r\nvar source2 = {a: null, c: 5}\r\n\r\nvar targetArray = [1, 2, 3];\r\nvar sourceArray = [4, 5];\r\n\r\nvar newTarget = Hoek.merge(target, source); // results in {a: 0, b: 2, c: 5}\r\nnewTarget = Hoek.merge(target, source2); // results in {a: null, b: 2, c: 5}\r\nnewTarget = Hoek.merge(target, source2, false); // results in {a: 1, b: 2, c: 5}\r\n\r\nnewTarget = Hoek.merge(targetArray, sourceArray) // results in [1, 2, 3, 4, 5]\r\nnewTarget = Hoek.merge(targetArray, sourceArray, true, false) // results in [4, 5]\r\n\r\n\r\n\r\n\r\n```\r\n\r\n### applyToDefaults(defaults, options)\r\n\r\nApply options to a copy of the defaults\r\n\r\n```javascript\r\n\r\nvar defaults = {host: \"localhost\", port: 8000};\r\nvar options = {port: 8080};\r\n\r\nvar config = Hoek.applyToDefaults(defaults, options); // results in {host: \"localhost\", port: 8080};\r\n\r\n\r\n```\r\n\r\n### unique(array, key)\r\n\r\nRemove duplicate items from Array\r\n\r\n```javascript\r\n\r\nvar array = [1, 2, 2, 3, 3, 4, 5, 6];\r\n\r\nvar newArray = Hoek.unique(array); // results in [1,2,3,4,5,6];\r\n\r\narray = [{id: 1}, {id: 1}, {id: 2}];\r\n\r\nnewArray = Hoek.unique(array, \"id\") // results in [{id: 1}, {id: 2}]\r\n\r\n```\r\n\r\n### mapToObject(array, key)\r\n\r\nConvert an Array into an Object\r\n\r\n```javascript\r\n\r\nvar array = [1,2,3];\r\nvar newObject = Hoek.mapToObject(array); // results in [{\"1\": true}, {\"2\": true}, {\"3\": true}]\r\n\r\narray = [{id: 1}, {id: 2}];\r\nnewObject = Hoek.mapToObject(array, \"id\") // results in [{\"id\": 1}, {\"id\": 2}]\r\n\r\n```\r\n### intersect(array1, array2)\r\n\r\nFind the common unique items in two arrays\r\n\r\n```javascript\r\n\r\nvar array1 = [1, 2, 3];\r\nvar array2 = [1, 4, 5];\r\n\r\nvar newArray = Hoek.intersect(array1, array2) // results in [1]\r\n\r\n```\r\n\r\n### matchKeys(obj, keys) \r\n\r\nFind which keys are present\r\n\r\n```javascript\r\n\r\nvar obj = {a: 1, b: 2, c: 3};\r\nvar keys = [\"a\", \"e\"];\r\n\r\nHoek.matchKeys(obj, keys) // returns [\"a\"]\r\n\r\n```\r\n\r\n### flatten(array, target)\r\n\r\nFlatten an array\r\n\r\n```javascript\r\n\r\nvar array = [1, 2, 3];\r\nvar target = [4, 5]; \r\n\r\nvar flattenedArray = Hoek.flatten(array, target) // results in [4, 5, 1, 2, 3];\r\n\r\n```\r\n\r\n### removeKeys(object, keys)\r\n\r\nRemove keys\r\n\r\n```javascript\r\n\r\nvar object = {a: 1, b: 2, c: 3, d: 4};\r\n\r\nvar keys = [\"a\", \"b\"];\r\n\r\nHoek.removeKeys(object, keys) // object is now {c: 3, d: 4}\r\n\r\n```\r\n\r\n### reach(obj, chain)\r\n\r\nConverts an object key chain string to reference\r\n\r\n```javascript\r\n\r\nvar chain = 'a.b.c';\r\nvar obj = {a : {b : { c : 1}}};\r\n\r\nHoek.reach(obj, chain) // returns 1\r\n\r\n```\r\n\r\n### inheritAsync(self, obj, keys) \r\n\r\nInherits a selected set of methods from an object, wrapping functions in asynchronous syntax and catching errors\r\n\r\n```javascript\r\n\r\nvar targetFunc = function () { };\r\n\r\nvar proto = {\r\n a: function () {\r\n return 'a!';\r\n },\r\n b: function () {\r\n return 'b!';\r\n },\r\n c: function () {\r\n throw new Error('c!');\r\n }\r\n };\r\n\r\nvar keys = ['a', 'c'];\r\n\r\nHoek.inheritAsync(targetFunc, proto, ['a', 'c']);\r\n\r\nvar target = new targetFunc();\r\n\r\ntarget.a(function(err, result){console.log(result)} // returns 'a!' \r\n\r\ntarget.c(function(err, result){console.log(result)} // returns undefined\r\n\r\ntarget.b(function(err, result){console.log(result)} // gives error: Object [object Object] has no method 'b'\r\n\r\n```\r\n\r\n### rename(obj, from, to)\r\n\r\nRename a key of an object\r\n\r\n```javascript\r\n\r\nvar obj = {a : 1, b : 2};\r\n\r\nHoek.rename(obj, \"a\", \"c\"); // obj is now {c : 1, b : 2}\r\n\r\n```\r\n\r\n\r\n# Timer\r\n\r\nA Timer object. Initializing a new timer object sets the ts to the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.\r\n\r\n```javascript\r\n\r\n\r\nexample : \r\n\r\n\r\nvar timerObj = new Hoek.Timer();\r\nconsole.log(\"Time is now: \" + timerObj.ts)\r\nconsole.log(\"Elapsed time from initialization: \" + timerObj.elapsed() + 'milliseconds')\r\n\r\n```\r\n\r\n# Binary Encoding/Decoding\r\n\r\n### base64urlEncode(value)\r\n\r\nEncodes value in Base64 or URL encoding\r\n\r\n### base64urlDecode(value)\r\n\r\nDecodes data in Base64 or URL encoding.\r\n# Escaping Characters\r\n\r\nHoek provides convenient methods for escaping html characters. The escaped characters are as followed:\r\n\r\n```javascript\r\n\r\ninternals.htmlEscaped = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"',\r\n \"'\": ''',\r\n '`': '`'\r\n};\r\n\r\n```\r\n\r\n### escapeHtml(string)\r\n\r\n```javascript\r\n\r\nvar string = ' hey ';\r\nvar escapedString = Hoek.escapeHtml(string); // returns <html> hey </html>\r\n\r\n```\r\n\r\n### escapeHeaderAttribute(attribute)\r\n\r\nEscape attribute value for use in HTTP header\r\n\r\n```javascript\r\n\r\nvar a = Hoek.escapeHeaderAttribute('I said \"go w\\\\o me\"'); //returns I said \\\"go w\\\\o me\\\"\r\n\r\n\r\n```\r\n\r\n\r\n### escapeRegex(string)\r\n\r\nEscape string for Regex construction\r\n\r\n```javascript\r\n\r\nvar a = Hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\\\/`\"(>)[<]d{}s,'); // returns 4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`\"\\(>\\)\\[<\\]d\\{\\}s\\,\r\n\r\n\r\n\r\n```\r\n\r\n# Errors\r\n\r\n### assert(message)\r\n\r\n```javascript\r\n\r\nvar a = 1, b =2;\r\n\r\nHoek.assert(a === b, 'a should equal b'); // ABORT: a should equal b\r\n\r\n```\r\n\r\n### abort(message)\r\n\r\nFirst checks if process.env.NODE_ENV === 'test', and if so, throws error message. Otherwise,\r\ndisplays most recent stack and then exits process.\r\n\r\n\r\n\r\n### displayStack(slice)\r\n\r\nDisplays the trace stack\r\n\r\n```javascript\r\n\r\nvar stack = Hoek.displayStack();\r\nconsole.log(stack) // returns something like:\r\n\r\n[ 'null (/Users/user/Desktop/hoek/test.js:4:18)',\r\n 'Module._compile (module.js:449:26)',\r\n 'Module._extensions..js (module.js:467:10)',\r\n 'Module.load (module.js:356:32)',\r\n 'Module._load (module.js:312:12)',\r\n 'Module.runMain (module.js:492:10)',\r\n 'startup.processNextTick.process._tickCallback (node.js:244:9)' ]\r\n\r\n```\r\n\r\n### callStack(slice)\r\n\r\nReturns a trace stack array.\r\n\r\n```javascript\r\n\r\nvar stack = Hoek.callStack();\r\nconsole.log(stack) // returns something like:\r\n\r\n[ [ '/Users/user/Desktop/hoek/test.js', 4, 18, null, false ],\r\n [ 'module.js', 449, 26, 'Module._compile', false ],\r\n [ 'module.js', 467, 10, 'Module._extensions..js', false ],\r\n [ 'module.js', 356, 32, 'Module.load', false ],\r\n [ 'module.js', 312, 12, 'Module._load', false ],\r\n [ 'module.js', 492, 10, 'Module.runMain', false ],\r\n [ 'node.js',\r\n 244,\r\n 9,\r\n 'startup.processNextTick.process._tickCallback',\r\n false ] ]\r\n\r\n\r\n```\r\n\r\n### toss(condition)\r\n\r\ntoss(condition /*, [message], callback */)\r\n\r\nReturn an error as first argument of a callback\r\n\r\n\r\n# Load Files\r\n\r\n### loadPackage(dir)\r\n\r\nLoad and parse package.json process root or given directory\r\n\r\n```javascript\r\n\r\nvar pack = Hoek.loadPackage(); // pack.name === 'hoek'\r\n\r\n```\r\n\r\n### loadDirModules(path, excludeFiles, target) \r\n\r\nLoads modules from a given path; option to exclude files (array).\r\n\r\n\r\n\r\n\r\n", - "readmeFilename": "README.md", + "_id": "hoek@0.9.1", + "dist": { + "shasum": "3d322462badf07716ea7eb85baf88079cddce505", + "tarball": "http://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz" + }, + "_from": "hoek@0.9.x", + "_npmVersion": "1.2.18", + "_npmUser": { + "name": "hueniverse", + "email": "eran@hueniverse.com" + }, + "maintainers": [ + { + "name": "hueniverse", + "email": "eran@hueniverse.com" + }, + { + "name": "thegoleffect", + "email": "thegoleffect@gmail.com" + } + ], + "directories": {}, + "_shasum": "3d322462badf07716ea7eb85baf88079cddce505", + "_resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz", "bugs": { "url": "https://github.com/spumko/hoek/issues" }, - "homepage": "https://github.com/spumko/hoek", - "_id": "hoek@0.9.1", - "_from": "hoek@0.9.x" + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/spumko/hoek" } diff --git a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json index 4c4b2f5793..c96e8482ac 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +++ b/deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/package.json @@ -37,12 +37,29 @@ "url": "http://github.com/hueniverse/sntp/raw/master/LICENSE" } ], - "readme": "# sntp\n\nAn SNTP v4 client (RFC4330) for node. Simpy connects to the NTP or SNTP server requested and returns the server time\nalong with the roundtrip duration and clock offset. To adjust the local time to the NTP time, add the returned `t` offset\nto the local time.\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/sntp.png)](http://travis-ci.org/hueniverse/sntp)\n\n# Usage\n\n```javascript\nvar Sntp = require('sntp');\n\n// All options are optional\n\nvar options = {\n host: 'nist1-sj.ustiming.org', // Defaults to pool.ntp.org\n port: 123, // Defaults to 123 (NTP)\n resolveReference: true, // Default to false (not resolving)\n timeout: 1000 // Defaults to zero (no timeout)\n};\n\n// Request server time\n\nSntp.time(options, function (err, time) {\n\n if (err) {\n console.log('Failed: ' + err.message);\n process.exit(1);\n }\n\n console.log('Local clock is off by: ' + time.t + ' milliseconds');\n process.exit(0);\n});\n```\n\nIf an application needs to maintain continuous time synchronization, the module provides a stateful method for\nquerying the current offset only when the last one is too old (defaults to daily).\n\n```javascript\n// Request offset once\n\nSntp.offset(function (err, offset) {\n\n console.log(offset); // New (served fresh)\n\n // Request offset again\n\n Sntp.offset(function (err, offset) {\n\n console.log(offset); // Identical (served from cache)\n });\n});\n```\n\nTo set a background offset refresh, start the interval and use the provided now() method. If for any reason the\nclient fails to obtain an up-to-date offset, the current system clock is used.\n\n```javascript\nvar before = Sntp.now(); // System time without offset\n\nSntp.start(function () {\n\n var now = Sntp.now(); // With offset\n Sntp.stop();\n});\n```\n\n", - "readmeFilename": "README.md", + "_id": "sntp@0.2.4", + "dist": { + "shasum": "fb885f18b0f3aad189f824862536bceeec750900", + "tarball": "http://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz" + }, + "_from": "sntp@0.2.x", + "_npmVersion": "1.2.18", + "_npmUser": { + "name": "hueniverse", + "email": "eran@hueniverse.com" + }, + "maintainers": [ + { + "name": "hueniverse", + "email": "eran@hueniverse.com" + } + ], + "directories": {}, + "_shasum": "fb885f18b0f3aad189f824862536bceeec750900", + "_resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz", "bugs": { "url": "https://github.com/hueniverse/sntp/issues" }, - "homepage": "https://github.com/hueniverse/sntp", - "_id": "sntp@0.2.4", - "_from": "sntp@0.2.x" + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/hueniverse/sntp" } diff --git a/deps/npm/node_modules/request/node_modules/hawk/package.json b/deps/npm/node_modules/request/node_modules/hawk/package.json index 16feb783c7..fadd7a97f0 100755 --- a/deps/npm/node_modules/request/node_modules/hawk/package.json +++ b/deps/npm/node_modules/request/node_modules/hawk/package.json @@ -1,7 +1,7 @@ { "name": "hawk", "description": "HTTP Hawk Authentication Scheme", - "version": "1.0.0", + "version": "1.1.1", "author": { "name": "Eran Hammer", "email": "eran@hueniverse.com", @@ -42,12 +42,29 @@ "url": "http://github.com/hueniverse/hawk/raw/master/LICENSE" } ], - "readme": "![hawk Logo](https://raw.github.com/hueniverse/hawk/master/images/hawk.png)\n\n **Hawk** is an HTTP authentication scheme using a message authentication code (MAC) algorithm to provide partial\nHTTP request cryptographic verification. For more complex use cases such as access delegation, see [Oz](https://github.com/hueniverse/oz).\n\nCurrent version: **1.0**\n\n[![Build Status](https://secure.travis-ci.org/hueniverse/hawk.png)](http://travis-ci.org/hueniverse/hawk)\n\n# Table of Content\n\n- [**Introduction**](#introduction)\n - [Replay Protection](#replay-protection)\n - [Usage Example](#usage-example)\n - [Protocol Example](#protocol-example)\n - [Payload Validation](#payload-validation)\n - [Response Payload Validation](#response-payload-validation)\n - [Browser Support and Considerations](#browser-support-and-considerations)\n

      \n- [**Single URI Authorization**](#single-uri-authorization)\n - [Usage Example](#bewit-usage-example)\n

      \n- [**Security Considerations**](#security-considerations)\n - [MAC Keys Transmission](#mac-keys-transmission)\n - [Confidentiality of Requests](#confidentiality-of-requests)\n - [Spoofing by Counterfeit Servers](#spoofing-by-counterfeit-servers)\n - [Plaintext Storage of Credentials](#plaintext-storage-of-credentials)\n - [Entropy of Keys](#entropy-of-keys)\n - [Coverage Limitations](#coverage-limitations)\n - [Future Time Manipulation](#future-time-manipulation)\n - [Client Clock Poisoning](#client-clock-poisoning)\n - [Bewit Limitations](#bewit-limitations)\n - [Host Header Forgery](#host-header-forgery)\n

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

      \n- [**Acknowledgements**](#acknowledgements)\n\n# Introduction\n\n**Hawk** is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with\npartial cryptographic verification of the request and response, covering the HTTP method, request URI, host,\nand optionally the request payload.\n\nSimilar to the HTTP [Digest access authentication schemes](http://www.ietf.org/rfc/rfc2617.txt), **Hawk** uses a set of\nclient credentials which include an identifier (e.g. username) and key (e.g. password). Likewise, just as with the Digest scheme,\nthe key is never included in authenticated requests. Instead, it is used to calculate a request MAC value which is\nincluded in its place.\n\nHowever, **Hawk** has several differences from Digest. In particular, while both use a nonce to limit the possibility of\nreplay attacks, in **Hawk** the client generates the nonce and uses it in combination with a timestamp, leading to less\n\"chattiness\" (interaction with the server).\n\nAlso unlike Digest, this scheme is not intended to protect the key itself (the password in Digest) because\nthe client and server must both have access to the key material in the clear.\n\nThe primary design goals of this scheme are to:\n* simplify and improve HTTP authentication for services that are unwilling or unable to deploy TLS for all resources,\n* secure credentials against leakage (e.g., when the client uses some form of dynamic configuration to determine where\n to send an authenticated request), and\n* avoid the exposure of credentials sent to a malicious server over an unauthenticated secure channel due to client\n failure to validate the server's identity as part of its TLS handshake.\n\nIn addition, **Hawk** supports a method for granting third-parties temporary access to individual resources using\na query parameter called _bewit_ (in falconry, a leather strap used to attach a tracking device to the leg of a hawk).\n\nThe **Hawk** scheme requires the establishment of a shared symmetric key between the client and the server,\nwhich is beyond the scope of this module. Typically, the shared credentials are established via an initial\nTLS-protected phase or derived from some other shared confidential information available to both the client\nand the server.\n\n\n## Replay Protection\n\nWithout replay protection, an attacker can use a compromised (but otherwise valid and authenticated) request more \nthan once, gaining access to a protected resource. To mitigate this, clients include both a nonce and a timestamp when \nmaking requests. This gives the server enough information to prevent replay attacks.\n\nThe nonce is generated by the client, and is a string unique across all requests with the same timestamp and\nkey identifier combination. \n\nThe timestamp enables the server to restrict the validity period of the credentials where requests occuring afterwards\nare rejected. It also removes the need for the server to retain an unbounded number of nonce values for future checks.\nBy default, **Hawk** uses a time window of 1 minute to allow for time skew between the client and server (which in\npractice translates to a maximum of 2 minutes as the skew can be positive or negative).\n\nUsing a timestamp requires the client's clock to be in sync with the server's clock. **Hawk** requires both the client\nclock and the server clock to use NTP to ensure synchronization. However, given the limitations of some client types\n(e.g. browsers) to deploy NTP, the server provides the client with its current time (in seconds precision) in response\nto a bad timestamp.\n\nThere is no expectation that the client will adjust its system clock to match the server (in fact, this would be a\npotential attack vector). Instead, the client only uses the server's time to calculate an offset used only\nfor communications with that particular server. The protocol rewards clients with synchronized clocks by reducing\nthe number of round trips required to authenticate the first request.\n\n\n## Usage Example\n\nServer code:\n\n```javascript\nvar Http = require('http');\nvar Hawk = require('hawk');\n\n\n// Credentials lookup function\n\nvar credentialsFunc = function (id, callback) {\n\n var credentials = {\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256',\n user: 'Steve'\n };\n\n return callback(null, credentials);\n};\n\n// Create HTTP server\n\nvar handler = function (req, res) {\n\n // Authenticate incoming request\n\n Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials, artifacts) {\n\n // Prepare response\n\n var payload = (!err ? 'Hello ' + credentials.user + ' ' + artifacts.ext : 'Shoosh!');\n var headers = { 'Content-Type': 'text/plain' };\n\n // Generate Server-Authorization response header\n\n var header = Hawk.server.header(credentials, artifacts, { payload: payload, contentType: headers['Content-Type'] });\n headers['Server-Authorization'] = header;\n\n // Send the response back\n\n res.writeHead(!err ? 200 : 401, headers);\n res.end(payload);\n });\n};\n\n// Start server\n\nHttp.createServer(handler).listen(8000, 'example.com');\n```\n\nClient code:\n\n```javascript\nvar Request = require('request');\nvar Hawk = require('hawk');\n\n\n// Client credentials\n\nvar credentials = {\n id: 'dh37fgj492je',\n key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',\n algorithm: 'sha256'\n}\n\n// Request options\n\nvar requestOptions = {\n uri: 'http://example.com:8000/resource/1?b=1&a=2',\n method: 'GET',\n headers: {}\n};\n\n// Generate Authorization request header\n\nvar header = Hawk.client.header('http://example.com:8000/resource/1?b=1&a=2', 'GET', { credentials: credentials, ext: 'some-app-data' });\nrequestOptions.headers.Authorization = header.field;\n\n// Send authenticated request\n\nRequest(requestOptions, function (error, response, body) {\n\n // Authenticate the server's response\n\n var isValid = Hawk.client.authenticate(response, credentials, header.artifacts, { payload: body });\n\n // Output results\n\n console.log(response.statusCode + ': ' + body + (isValid ? ' (valid)' : ' (invalid)'));\n});\n```\n\n**Hawk** utilized the [**SNTP**](https://github.com/hueniverse/sntp) module for time sync management. By default, the local\nmachine time is used. To automatically retrieve and synchronice the clock within the application, use the SNTP 'start()' method.\n\n```javascript\nHawk.sntp.start();\n```\n\n\n## Protocol Example\n\nThe client attempts to access a protected resource without authentication, sending the following HTTP request to\nthe resource server:\n\n```\nGET /resource/1?b=1&a=2 HTTP/1.1\nHost: example.com:8000\n```\n\nThe resource server returns an authentication challenge.\n\n```\nHTTP/1.1 401 Unauthorized\nWWW-Authenticate: Hawk\n```\n\nThe client has previously obtained a set of **Hawk** credentials for accessing resources on the \"http://example.com/\"\nserver. The **Hawk** credentials issued to the client include the following attributes:\n\n* Key identifier: dh37fgj492je\n* Key: werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn\n* Algorithm: sha256\n\nThe client generates the authentication header by calculating a timestamp (e.g. the number of seconds since January 1,\n1970 00:00:00 GMT), generating a nonce, and constructing the normalized request string (each value followed by a newline\ncharacter):\n\n```\nhawk.1.header\n1353832234\nj4h3g2\nGET\n/resource/1?b=1&a=2\nexample.com\n8000\n\nsome-app-ext-data\n\n```\n\nThe request MAC is calculated using HMAC with the specified hash algorithm \"sha256\" and the key over the normalized request string.\nThe result is base64-encoded to produce the request MAC:\n\n```\n6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=\n```\n\nThe client includes the **Hawk** key identifier, timestamp, nonce, application specific data, and request MAC with the request using\nthe HTTP `Authorization` request header field:\n\n```\nGET /resource/1?b=1&a=2 HTTP/1.1\nHost: example.com:8000\nAuthorization: Hawk id=\"dh37fgj492je\", ts=\"1353832234\", nonce=\"j4h3g2\", ext=\"some-app-ext-data\", mac=\"6R4rV5iE+NPoym+WwjeHzjAGXUtLNIxmo1vpMofpLAE=\"\n```\n\nThe server validates the request by calculating the request MAC again based on the request received and verifies the validity\nand scope of the **Hawk** credentials. If valid, the server responds with the requested resource.\n\n\n### Payload Validation\n\n**Hawk** provides optional payload validation. When generating the authentication header, the client calculates a payload hash\nusing the specified hash algorithm. The hash is calculated over the concatenated value of (each followed by a newline character):\n* `hawk.1.payload`\n* the content-type in lowercase, without any parameters (e.g. `application/json`)\n* the request payload prior to any content encoding (the exact representation requirements should be specified by the server for payloads other than simple single-part ascii to ensure interoperability)\n\nFor example:\n\n* Payload: `Thank you for flying Hawk`\n* Content Type: `text/plain`\n* Hash (sha256): `Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=`\n\nResults in the following input to the payload hash function (newline terminated values):\n\n```\nhawk.1.payload\ntext/plain\nThank you for flying Hawk\n\n```\n\nWhich produces the following hash value:\n\n```\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\n```\n\nThe client constructs the normalized request string (newline terminated values):\n\n```\nhawk.1.header\n1353832234\nj4h3g2\nPOST\n/resource/1?a=1&b=2\nexample.com\n8000\nYi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\nsome-app-ext-data\n\n```\n\nThen calculates the request MAC and includes the **Hawk** key identifier, timestamp, nonce, payload hash, application specific data,\nand request MAC, with the request using the HTTP `Authorization` request header field:\n\n```\nPOST /resource/1?a=1&b=2 HTTP/1.1\nHost: example.com:8000\nAuthorization: Hawk id=\"dh37fgj492je\", ts=\"1353832234\", nonce=\"j4h3g2\", hash=\"Yi9LfIIFRtBEPt74PVmbTF/xVAwPn7ub15ePICfgnuY=\", ext=\"some-app-ext-data\", mac=\"aSe1DERmZuRl3pI36/9BdZmnErTw3sNzOOAUlfeKjVw=\"\n```\n\nIt is up to the server if and when it validates the payload for any given request, based solely on it's security policy\nand the nature of the data included.\n\nIf the payload is available at the time of authentication, the server uses the hash value provided by the client to construct\nthe normalized string and validates the MAC. If the MAC is valid, the server calculates the payload hash and compares the value\nwith the provided payload hash in the header. In many cases, checking the MAC first is faster than calculating the payload hash.\n\nHowever, if the payload is not available at authentication time (e.g. too large to fit in memory, streamed elsewhere, or processed\nat a different stage in the application), the server may choose to defer payload validation for later by retaining the hash value\nprovided by the client after validating the MAC.\n\nIt is important to note that MAC validation does not mean the hash value provided by the client is valid, only that the value\nincluded in the header was not modified. Without calculating the payload hash on the server and comparing it to the value provided\nby the client, the payload may be modified by an attacker.\n\n\n## Response Payload Validation\n\n**Hawk** provides partial response payload validation. The server includes the `Server-Authorization` response header which enables the\nclient to authenticate the response and ensure it is talking to the right server. **Hawk** defines the HTTP `Server-Authorization` header\nas a response header using the exact same syntax as the `Authorization` request header field.\n\nThe header is contructed using the same process as the client's request header. The server uses the same credentials and other\nartifacts provided by the client to constructs the normalized request string. The `ext` and `hash` values are replaced with\nnew values based on the server response. The rest as identical to those used by the client.\n\nThe result MAC digest is included with the optional `hash` and `ext` values:\n\n```\nServer-Authorization: Hawk mac=\"XIJRsMl/4oL+nn+vKoeVZPdCHXB4yJkNnBbTbHFZUYE=\", hash=\"f9cDF/TDm7TkYRLnGwRMfeDzT6LixQVLvrIKhh0vgmM=\", ext=\"response-specific\"\n```\n\n\n## Browser Support and Considerations\n\nA browser script is provided for including using a ` +``` + +In [Narwhal](http://narwhaljs.org/), [Node.js](http://nodejs.org/), and [RingoJS](http://ringojs.org/): + +```js +var punycode = require('punycode'); +``` + +In [Rhino](http://www.mozilla.org/rhino/): + +```js +load('punycode.js'); +``` + +Using an AMD loader like [RequireJS](http://requirejs.org/): + +```js +require( + { + 'paths': { + 'punycode': 'path/to/punycode' + } + }, + ['punycode'], + function(punycode) { + console.log(punycode); + } +); +``` + +## API + +### `punycode.decode(string)` + +Converts a Punycode string of ASCII symbols to a string of Unicode symbols. + +```js +// decode domain name parts +punycode.decode('maana-pta'); // 'mañana' +punycode.decode('--dqo34k'); // '☃-⌘' +``` + +### `punycode.encode(string)` + +Converts a string of Unicode symbols to a Punycode string of ASCII symbols. + +```js +// encode domain name parts +punycode.encode('mañana'); // 'maana-pta' +punycode.encode('☃-⌘'); // '--dqo34k' +``` + +### `punycode.toUnicode(input)` + +Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. + +```js +// decode domain names +punycode.toUnicode('xn--maana-pta.com'); +// → 'mañana.com' +punycode.toUnicode('xn----dqo34k.com'); +// → '☃-⌘.com' + +// decode email addresses +punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); +// → 'джумла@джpумлатест.bрфa' +``` + +### `punycode.toASCII(input)` + +Converts a Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that's already in ASCII. + +```js +// encode domain names +punycode.toASCII('mañana.com'); +// → 'xn--maana-pta.com' +punycode.toASCII('☃-⌘.com'); +// → 'xn----dqo34k.com' + +// encode email addresses +punycode.toASCII('джумла@джpумлатест.bрфa'); +// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' +``` + +### `punycode.ucs2` + +#### `punycode.ucs2.decode(string)` + +Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](http://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. + +```js +punycode.ucs2.decode('abc'); +// → [0x61, 0x62, 0x63] +// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: +punycode.ucs2.decode('\uD834\uDF06'); +// → [0x1D306] +``` + +#### `punycode.ucs2.encode(codePoints)` + +Creates a string based on an array of numeric code point values. + +```js +punycode.ucs2.encode([0x61, 0x62, 0x63]); +// → 'abc' +punycode.ucs2.encode([0x1D306]); +// → '\uD834\uDF06' +``` + +### `punycode.version` + +A string representing the current Punycode.js version number. + +## Unit tests & code coverage + +After cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. + +Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`. + +To generate the code coverage report, use `grunt cover`. + +Feel free to fork if you see possible improvements! + +## Author + +| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](http://mathiasbynens.be/) | + +## Contributors + +| [![twitter/jdalton](https://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | +|---| +| [John-David Dalton](http://allyoucanleet.com/) | + +## License + +Punycode.js is available under the [MIT](http://mths.be/mit) license. diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json index 0cc83fb223..ab13fc836f 100644 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json +++ b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/package.json @@ -1,6 +1,6 @@ { "name": "punycode", - "version": "1.2.3", + "version": "1.3.1", "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", "homepage": "http://mths.be/punycode", "main": "punycode.js", @@ -17,57 +17,71 @@ { "type": "MIT", "url": "http://mths.be/mit" - }, - { - "type": "GPL", - "url": "http://mths.be/gpl" } ], "author": { "name": "Mathias Bynens", - "email": "mathias@qiwi.be", "url": "http://mathiasbynens.be/" }, "contributors": [ { "name": "Mathias Bynens", - "email": "mathias@qiwi.be", "url": "http://mathiasbynens.be/" }, { "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", "url": "http://allyoucanleet.com/" } ], - "bugs": { - "url": "https://github.com/bestiejs/punycode.js/issues" - }, "repository": { "type": "git", "url": "https://github.com/bestiejs/punycode.js.git" }, - "engines": [ - "node", - "rhino" + "bugs": { + "url": "https://github.com/bestiejs/punycode.js/issues" + }, + "files": [ + "LICENSE-MIT.txt", + "punycode.js" ], "directories": { - "doc": "docs", "test": "tests" }, "scripts": { "test": "node tests/tests.js" }, "devDependencies": { - "grunt": "~0.4.1", - "grunt-contrib-uglify": "~0.2.2", - "grunt-shell": "~0.2.2", - "istanbul": "~0.1.37", - "qunit-clib": "~1.3.0", + "coveralls": "^2.10.1", + "grunt": "^0.4.5", + "grunt-contrib-uglify": "^0.5.0", + "grunt-shell": "^0.7.0", + "istanbul": "^0.2.13", + "qunit-extras": "^1.2.0", "qunitjs": "~1.11.0", - "requirejs": "~2.1.6" + "requirejs": "^2.1.14" + }, + "_id": "punycode@1.3.1", + "_shasum": "710afe5123c20a1530b712e3e682b9118fe8058e", + "_from": "punycode@>=0.2.0", + "_npmVersion": "1.4.9", + "_npmUser": { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + "maintainers": [ + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "reconbot", + "email": "wizard@roborooter.com" + } + ], + "dist": { + "shasum": "710afe5123c20a1530b712e3e682b9118fe8058e", + "tarball": "http://registry.npmjs.org/punycode/-/punycode-1.3.1.tgz" }, - "readme": "ERROR: No README data found!", - "_id": "punycode@1.2.3", - "_from": "punycode@>=0.2.0" + "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.1.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js index 41803ba423..6ab1df3a03 100644 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js +++ b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.js @@ -1,12 +1,17 @@ -/*! http://mths.be/punycode v1.2.3 by @mathias */ +/*! http://mths.be/punycode v1.3.1 by @mathias */ ;(function(root) { /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports; + var freeExports = typeof exports == 'object' && exports && + !exports.nodeType && exports; var freeModule = typeof module == 'object' && module && - module.exports == freeExports && module; + !module.nodeType && module; var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + if ( + freeGlobal.global === freeGlobal || + freeGlobal.window === freeGlobal || + freeGlobal.self === freeGlobal + ) { root = freeGlobal; } @@ -32,8 +37,8 @@ /** Regular expressions */ regexPunycode = /^xn--/, - regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators + regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators /** Error messages */ errors = { @@ -72,23 +77,35 @@ */ function map(array, fn) { var length = array.length; + var result = []; while (length--) { - array[length] = fn(array[length]); + result[length] = fn(array[length]); } - return array; + return result; } /** - * A simple `Array#map`-like wrapper to work with domain name strings. + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. * @private - * @param {String} domain The domain name. + * @param {String} domain The domain name or email address. * @param {Function} callback The function that gets called for every * character. * @returns {Array} A new string of characters returned by the callback * function. */ function mapDomain(string, fn) { - return map(string.split(regexSeparators), fn).join('.'); + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + var labels = string.split(regexSeparators); + var encoded = map(labels, fn).join('.'); + return result + encoded; } /** @@ -228,7 +245,6 @@ k, digit, t, - length, /** Cached calculation results */ baseMinusT; @@ -308,8 +324,8 @@ } /** - * Converts a string of Unicode symbols to a Punycode string of ASCII-only - * symbols. + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. * @memberOf punycode * @param {String} input The string of Unicode symbols. * @returns {String} The resulting Punycode string of ASCII-only symbols. @@ -422,17 +438,18 @@ } /** - * Converts a Punycode string representing a domain name to Unicode. Only the - * Punycoded parts of the domain name will be converted, i.e. it doesn't - * matter if you call it on a string that has already been converted to - * Unicode. + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. * @memberOf punycode - * @param {String} domain The Punycode domain name to convert to Unicode. + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. * @returns {String} The Unicode representation of the given Punycode * string. */ - function toUnicode(domain) { - return mapDomain(domain, function(string) { + function toUnicode(input) { + return mapDomain(input, function(string) { return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; @@ -440,15 +457,18 @@ } /** - * Converts a Unicode string representing a domain name to Punycode. Only the - * non-ASCII parts of the domain name will be converted, i.e. it doesn't - * matter if you call it with a domain that's already in ASCII. + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. * @memberOf punycode - * @param {String} domain The domain name to convert, as a Unicode string. - * @returns {String} The Punycode representation of the given domain name. + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. */ - function toASCII(domain) { - return mapDomain(domain, function(string) { + function toASCII(input) { + return mapDomain(input, function(string) { return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; @@ -464,7 +484,7 @@ * @memberOf punycode * @type String */ - 'version': '1.2.3', + 'version': '1.3.1', /** * An object of methods to convert from JavaScript's internal character * representation (UCS-2) to Unicode code points, and back. @@ -490,11 +510,11 @@ typeof define.amd == 'object' && define.amd ) { - define(function() { + define('punycode', function() { return punycode; }); - } else if (freeExports && !freeExports.nodeType) { - if (freeModule) { // in Node.js or RingoJS v0.8.0+ + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+ freeModule.exports = punycode; } else { // in Narwhal or RingoJS v0.7.0- for (key in punycode) { diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js deleted file mode 100644 index ac5d914a1f..0000000000 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/punycode.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! http://mths.be/punycode v1.2.3 by @mathias */ -(function(o){function e(o){throw RangeError(L[o])}function n(o,e){for(var n=o.length;n--;)o[n]=e(o[n]);return o}function t(o,e){return n(o.split(S),e).join(".")}function r(o){for(var e,n,t=[],r=0,u=o.length;u>r;)e=o.charCodeAt(r++),e>=55296&&56319>=e&&u>r?(n=o.charCodeAt(r++),56320==(64512&n)?t.push(((1023&e)<<10)+(1023&n)+65536):(t.push(e),r--)):t.push(e);return t}function u(o){return n(o,function(o){var e="";return o>65535&&(o-=65536,e+=R(55296|1023&o>>>10),o=56320|1023&o),e+=R(o)}).join("")}function i(o){return 10>o-48?o-22:26>o-65?o-65:26>o-97?o-97:x}function f(o,e){return o+22+75*(26>o)-((0!=e)<<5)}function c(o,e,n){var t=0;for(o=n?P(o/m):o>>1,o+=P(o/e);o>M*y>>1;t+=x)o=P(o/M);return P(t+(M+1)*o/(o+j))}function l(o){var n,t,r,f,l,d,s,a,p,h,v=[],g=o.length,w=0,j=I,m=A;for(t=o.lastIndexOf(F),0>t&&(t=0),r=0;t>r;++r)o.charCodeAt(r)>=128&&e("not-basic"),v.push(o.charCodeAt(r));for(f=t>0?t+1:0;g>f;){for(l=w,d=1,s=x;f>=g&&e("invalid-input"),a=i(o.charCodeAt(f++)),(a>=x||a>P((b-w)/d))&&e("overflow"),w+=a*d,p=m>=s?C:s>=m+y?y:s-m,!(p>a);s+=x)h=x-p,d>P(b/h)&&e("overflow"),d*=h;n=v.length+1,m=c(w-l,n,0==l),P(w/n)>b-j&&e("overflow"),j+=P(w/n),w%=n,v.splice(w++,0,j)}return u(v)}function d(o){var n,t,u,i,l,d,s,a,p,h,v,g,w,j,m,E=[];for(o=r(o),g=o.length,n=I,t=0,l=A,d=0;g>d;++d)v=o[d],128>v&&E.push(R(v));for(u=i=E.length,i&&E.push(F);g>u;){for(s=b,d=0;g>d;++d)v=o[d],v>=n&&s>v&&(s=v);for(w=u+1,s-n>P((b-t)/w)&&e("overflow"),t+=(s-n)*w,n=s,d=0;g>d;++d)if(v=o[d],n>v&&++t>b&&e("overflow"),v==n){for(a=t,p=x;h=l>=p?C:p>=l+y?y:p-l,!(h>a);p+=x)m=a-h,j=x-h,E.push(R(f(h+m%j,0))),a=P(m/j);E.push(R(f(a,0))),l=c(t,w,u==i),t=0,++u}++t,++n}return E.join("")}function s(o){return t(o,function(o){return E.test(o)?l(o.slice(4).toLowerCase()):o})}function a(o){return t(o,function(o){return O.test(o)?"xn--"+d(o):o})}var p="object"==typeof exports&&exports,h="object"==typeof module&&module&&module.exports==p&&module,v="object"==typeof global&&global;(v.global===v||v.window===v)&&(o=v);var g,w,b=2147483647,x=36,C=1,y=26,j=38,m=700,A=72,I=128,F="-",E=/^xn--/,O=/[^ -~]/,S=/\x2E|\u3002|\uFF0E|\uFF61/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=x-C,P=Math.floor,R=String.fromCharCode;if(g={version:"1.2.3",ucs2:{decode:r,encode:u},decode:l,encode:d,toASCII:a,toUnicode:s},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return g});else if(p&&!p.nodeType)if(h)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else o.punycode=g})(this); \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt deleted file mode 100644 index a7501f98de..0000000000 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright 2011-2013 John-David Dalton - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md deleted file mode 100644 index fbddce918e..0000000000 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Docdown v1.0.0 - -A simple JSDoc to Markdown documentation generator. - -## Documentation - -The documentation for Docdown can be viewed here: [/doc/README.md](https://github.com/jdalton/docdown/blob/master/doc/README.md#readme) - -For a list of upcoming features, check out our [roadmap](https://github.com/jdalton/docdown/wiki/Roadmap). - -## Installation and usage - -Usage example: - -```php -require("docdown.php"); - -// generate Markdown -$markdown = docdown(array( - "path" => $filepath, - "url" => "https://github.com/username/project/blob/master/my.js" -)); -``` - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | -|---| -| [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md deleted file mode 100644 index 459d36abdc..0000000000 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# Docdown v1.0.0 - - - - - - -## `docdown` -* [`docdown`](#docdown$optionsarray) - - - - - - - - - - - - -## `docdown` - - - -### `docdown([$options=array()])` -# [Ⓢ](https://github.com/jdalton/docdown/blob/master/docdown.php#L34 "View in source") [Ⓣ][1] - -Generates Markdown from JSDoc entries in a given file. - -#### Arguments -1. `[$options=array()]` *(Array)*: The options array. - -#### Returns -*(String)*: The generated Markdown. - -#### Example -```php -// specify a file path -$markdown = docdown(array( - // path to js file - 'path' => $filepath, - // url used to reference line numbers in code - 'url' => 'https://github.com/username/project/blob/master/my.js' -)); - -// or pass raw js -$markdown = docdown(array( - // raw JavaScript source - 'source' => $rawJS, - // documentation title - 'title' => 'My API Documentation', - // url used to reference line numbers in code - 'url' => 'https://github.com/username/project/blob/master/my.js' -)); -``` - -* * * - - - - - - - - - - - [1]: #docdown "Jump back to the TOC." \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php deleted file mode 100644 index eca8d145e5..0000000000 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/doc/parse.php +++ /dev/null @@ -1,35 +0,0 @@ - '../' . $file, - 'title' => 'Docdown v1.0.0', - 'url' => 'https://github.com/jdalton/docdown/blob/master/docdown.php' - )); - - // save to a .md file - file_put_contents($output . '.md', $markdown); - - // print - header('Content-Type: text/plain;charset=utf-8'); - echo $markdown . PHP_EOL; - -?> \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php deleted file mode 100644 index 4a786d7533..0000000000 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/docdown.php +++ /dev/null @@ -1,38 +0,0 @@ - - * Available under MIT license - */ -require(dirname(__FILE__) . '/src/DocDown/Generator.php'); - -/** - * Generates Markdown from JSDoc entries in a given file. - * - * @param {Array} [$options=array()] The options array. - * @returns {String} The generated Markdown. - * @example - * - * // specify a file path - * $markdown = docdown(array( - * // path to js file - * 'path' => $filepath, - * // url used to reference line numbers in code - * 'url' => 'https://github.com/username/project/blob/master/my.js' - * )); - * - * // or pass raw js - * $markdown = docdown(array( - * // raw JavaScript source - * 'source' => $rawJS, - * // documentation title - * 'title' => 'My API Documentation', - * // url used to reference line numbers in code - * 'url' => 'https://github.com/username/project/blob/master/my.js' - * )); - */ -function docdown( $options = array() ) { - $gen = new Generator($options); - return $gen->generate(); -} -?> \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php deleted file mode 100644 index 0a7c552e0d..0000000000 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Alias.php +++ /dev/null @@ -1,226 +0,0 @@ -owner = $owner; - $this->_name = $name; - $this->_call = $owner->getCall(); - $this->_category = $owner->getCategory(); - $this->_desc = $owner->getDesc(); - $this->_example = $owner->getExample(); - $this->_isCtor = $owner->isCtor(); - $this->_isLicense = $owner->isLicense(); - $this->_isPlugin = $owner->isPlugin(); - $this->_isPrivate = $owner->isPrivate(); - $this->_isStatic = $owner->isStatic(); - $this->_lineNumber = $owner->getLineNumber(); - $this->_members = $owner->getMembers(); - $this->_params = $owner->getParams(); - $this->_returns = $owner->getReturns(); - $this->_type = $owner->getType(); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the entry's `alias` objects. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `alias` objects. - */ - public function getAliases( $index = null ) { - $result = array(); - return $index !== null - ? @$result[$index] - : $result; - } - - /** - * Extracts the function call from the owner entry. - * - * @memberOf Alias - * @returns {String} The function call. - */ - public function getCall() { - return $this->_call; - } - - /** - * Extracts the owner entry's `category` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `category` data. - */ - public function getCategory() { - return $this->_category; - } - - /** - * Extracts the owner entry's description. - * - * @memberOf Alias - * @returns {String} The owner entry's description. - */ - public function getDesc() { - return $this->_desc; - } - - /** - * Extracts the owner entry's `example` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `example` data. - */ - public function getExample() { - return $this->_example; - } - - /** - * Checks if the entry is an alias. - * - * @memberOf Alias - * @returns {Boolean} Returns `true`. - */ - public function isAlias() { - return true; - } - - /** - * Checks if the owner entry is a constructor. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if a constructor, else `false`. - */ - public function isCtor() { - return $this->_isCtor; - } - - /** - * Checks if the owner entry is a license. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if a license, else `false`. - */ - public function isLicense() { - return $this->_isLicense; - } - - /** - * Checks if the owner entry *is* assigned to a prototype. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. - */ - public function isPlugin() { - return $this->_isPlugin; - } - - /** - * Checks if the owner entry is private. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if private, else `false`. - */ - public function isPrivate() { - return $this->_isPrivate; - } - - /** - * Checks if the owner entry is *not* assigned to a prototype. - * - * @memberOf Alias - * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. - */ - public function isStatic() { - return $this->_isStatic; - } - - /** - * Resolves the owner entry's line number. - * - * @memberOf Alias - * @returns {Number} The owner entry's line number. - */ - public function getLineNumber() { - return $this->_lineNumber; - } - - /** - * Extracts the owner entry's `member` data. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The owner entry's `member` data. - */ - public function getMembers( $index = null ) { - return $index !== null - ? @$this->_members[$index] - : $this->_members; - } - - /** - * Extracts the owner entry's `name` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `name` data. - */ - public function getName() { - return $this->_name; - } - - /** - * Extracts the owner entry's `param` data. - * - * @memberOf Alias - * @param {Number} $index The index of the array value to return. - * @returns {Array} The owner entry's `param` data. - */ - public function getParams( $index = null ) { - return $index !== null - ? @$this->_params[$index] - : $this->_params; - } - - /** - * Extracts the owner entry's `returns` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `returns` data. - */ - public function getReturns() { - return $this->_returns; - } - - /** - * Extracts the owner entry's `type` data. - * - * @memberOf Alias - * @returns {String} The owner entry's `type` data. - */ - public function getType() { - return $this->_type; - } -} -?> \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php deleted file mode 100644 index a973d9a679..0000000000 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Entry.php +++ /dev/null @@ -1,442 +0,0 @@ -entry = $entry; - $this->lang = $lang; - $this->source = str_replace(PHP_EOL, "\n", $source); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the documentation entries from source code. - * - * @static - * @memberOf Entry - * @param {String} $source The source code. - * @returns {Array} The array of entries. - */ - public static function getEntries( $source ) { - preg_match_all('#/\*\*(?![-!])[\s\S]*?\*/\s*.+#', $source, $result); - return array_pop($result); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Checks if the entry is a function reference. - * - * @private - * @memberOf Entry - * @returns {Boolean} Returns `true` if the entry is a function reference, else `false`. - */ - private function isFunction() { - if (!isset($this->_isFunction)) { - $this->_isFunction = !!( - $this->isCtor() || - count($this->getParams()) || - count($this->getReturns()) || - preg_match('/\*[\t ]*@function\b/', $this->entry) - ); - } - return $this->_isFunction; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Extracts the entry's `alias` objects. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `alias` objects. - */ - public function getAliases( $index = null ) { - if (!isset($this->_aliases)) { - preg_match('#\*[\t ]*@alias\s+(.+)#', $this->entry, $result); - - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - $result = preg_split('/,\s*/', $result); - natsort($result); - - foreach ($result as $resultIndex => $value) { - $result[$resultIndex] = new Alias($value, $this); - } - } - $this->_aliases = $result; - } - return $index !== null - ? @$this->_aliases[$index] - : $this->_aliases; - } - - /** - * Extracts the function call from the entry. - * - * @memberOf Entry - * @returns {String} The function call. - */ - public function getCall() { - if (isset($this->_call)) { - return $this->_call; - } - - preg_match('#\*/\s*(?:function ([^(]*)|(.*?)(?=[:=,]|return\b))#', $this->entry, $result); - if ($result = array_pop($result)) { - $result = array_pop(explode('var ', trim(trim(array_pop(explode('.', $result))), "'"))); - } - // resolve name - // avoid $this->getName() because it calls $this->getCall() - preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $name); - if (count($name)) { - $name = trim($name[1]); - } else { - $name = $result; - } - // compile function call syntax - if ($this->isFunction()) { - // compose parts - $result = array($result); - $params = $this->getParams(); - foreach ($params as $param) { - $result[] = $param[1]; - } - // format - $result = $name .'('. implode(array_slice($result, 1), ', ') .')'; - $result = str_replace(', [', ' [, ', str_replace('], [', ', ', $result)); - } - - $this->_call = $result ? $result : $name; - return $this->_call; - } - - /** - * Extracts the entry's `category` data. - * - * @memberOf Entry - * @returns {String} The entry's `category` data. - */ - public function getCategory() { - if (isset($this->_category)) { - return $this->_category; - } - - preg_match('#\*[\t ]*@category\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = $this->getType() == 'Function' ? 'Methods' : 'Properties'; - } - $this->_category = $result; - return $result; - } - - /** - * Extracts the entry's description. - * - * @memberOf Entry - * @returns {String} The entry's description. - */ - public function getDesc() { - if (isset($this->_desc)) { - return $this->_desc; - } - - preg_match('#/\*\*(?:\s*\*)?([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $type = $this->getType(); - $result = preg_replace('/:\n[\t ]*\*[\t ]*/', ":
      \n", $result[1]); - $result = preg_replace('/(?:^|\n)[\t ]*\*\n[\t ]*\*[\t ]*/', "\n\n", $result); - $result = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result); - $result = trim($result); - $result = ($type == 'Function' ? '' : '(' . str_replace('|', ', ', trim($type, '{}')) . '): ') . $result; - } - $this->_desc = $result; - return $result; - } - - /** - * Extracts the entry's `example` data. - * - * @memberOf Entry - * @returns {String} The entry's `example` data. - */ - public function getExample() { - if (isset($this->_example)) { - return $this->_example; - } - - preg_match('#\*[\t ]*@example\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', "\n", $result[1])); - $result = '```' . $this->lang . "\n" . $result . "\n```"; - } - $this->_example = $result; - return $result; - } - - /** - * Checks if the entry is an alias. - * - * @memberOf Entry - * @returns {Boolean} Returns `false`. - */ - public function isAlias() { - return false; - } - - /** - * Checks if the entry is a constructor. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if a constructor, else `false`. - */ - public function isCtor() { - if (!isset($this->_isCtor)) { - $this->_isCtor = !!preg_match('/\*[\t ]*@constructor\b/', $this->entry); - } - return $this->_isCtor; - } - - /** - * Checks if the entry is a license. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if a license, else `false`. - */ - public function isLicense() { - if (!isset($this->_isLicense)) { - $this->_isLicense = !!preg_match('/\*[\t ]*@license\b/', $this->entry); - } - return $this->_isLicense; - } - - /** - * Checks if the entry *is* assigned to a prototype. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if assigned to a prototype, else `false`. - */ - public function isPlugin() { - if (!isset($this->_isPlugin)) { - $this->_isPlugin = !$this->isCtor() && !$this->isPrivate() && !$this->isStatic(); - } - return $this->_isPlugin; - } - - /** - * Checks if the entry is private. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if private, else `false`. - */ - public function isPrivate() { - if (!isset($this->_isPrivate)) { - $this->_isPrivate = $this->isLicense() || !!preg_match('/\*[\t ]*@private\b/', $this->entry) || !preg_match('/\*[\t ]*@[a-z]+\b/', $this->entry); - } - return $this->_isPrivate; - } - - /** - * Checks if the entry is *not* assigned to a prototype. - * - * @memberOf Entry - * @returns {Boolean} Returns `true` if not assigned to a prototype, else `false`. - */ - public function isStatic() { - if (isset($this->_isStatic)) { - return $this->_isStatic; - } - - $public = !$this->isPrivate(); - $result = $public && !!preg_match('/\*[\t ]*@static\b/', $this->entry); - - // set in cases where it isn't explicitly stated - if ($public && !$result) { - if ($parent = array_pop(preg_split('/[#.]/', $this->getMembers(0)))) { - foreach (Entry::getEntries($this->source) as $entry) { - $entry = new Entry($entry, $this->source); - if ($entry->getName() == $parent) { - $result = !$entry->isCtor(); - break; - } - } - } else { - $result = true; - } - } - $this->_isStatic = $result; - return $result; - } - - /** - * Resolves the entry's line number. - * - * @memberOf Entry - * @returns {Number} The entry's line number. - */ - public function getLineNumber() { - if (!isset($this->_lineNumber)) { - preg_match_all('/\n/', substr($this->source, 0, strrpos($this->source, $this->entry) + strlen($this->entry)), $lines); - $this->_lineNumber = count(array_pop($lines)) + 1; - } - return $this->_lineNumber; - } - - /** - * Extracts the entry's `member` data. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array|String} The entry's `member` data. - */ - public function getMembers( $index = null ) { - if (!isset($this->_members)) { - preg_match('#\*[\t ]*@member(?:Of)?\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - $result = preg_split('/,\s*/', $result); - natsort($result); - } - $this->_members = $result; - } - return $index !== null - ? @$this->_members[$index] - : $this->_members; - } - - /** - * Extracts the entry's `name` data. - * - * @memberOf Entry - * @returns {String} The entry's `name` data. - */ - public function getName() { - if (isset($this->_name)) { - return $this->_name; - } - - preg_match('#\*[\t ]*@name\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = array_shift(explode('(', $this->getCall())); - } - $this->_name = $result; - return $result; - } - - /** - * Extracts the entry's `param` data. - * - * @memberOf Entry - * @param {Number} $index The index of the array value to return. - * @returns {Array} The entry's `param` data. - */ - public function getParams( $index = null ) { - if (!isset($this->_params)) { - preg_match_all('#\*[\t ]*@param\s+\{([^}]+)\}\s+(\[.+\]|[$\w|]+(?:\[.+\])?)\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#i', $this->entry, $result); - if (count($result = array_filter(array_slice($result, 1)))) { - // repurpose array - foreach ($result as $param) { - foreach ($param as $key => $value) { - if (!is_array($result[0][$key])) { - $result[0][$key] = array(); - } - $result[0][$key][] = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]*/', ' ', $value)); - } - } - $result = $result[0]; - } - $this->_params = $result; - } - return $index !== null - ? @$this->_params[$index] - : $this->_params; - } - - /** - * Extracts the entry's `returns` data. - * - * @memberOf Entry - * @returns {String} The entry's `returns` data. - */ - public function getReturns() { - if (isset($this->_returns)) { - return $this->_returns; - } - - preg_match('#\*[\t ]*@returns\s+\{([^}]+)\}\s+([\s\S]*?)(?=\*\s\@[a-z]|\*/)#', $this->entry, $result); - if (count($result)) { - $result = array_map('trim', array_slice($result, 1)); - $result[0] = str_replace('|', ', ', $result[0]); - $result[1] = preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1]); - } - $this->_returns = $result; - return $result; - } - - /** - * Extracts the entry's `type` data. - * - * @memberOf Entry - * @returns {String} The entry's `type` data. - */ - public function getType() { - if (isset($this->_type)) { - return $this->_type; - } - - preg_match('#\*[\t ]*@type\s+(.+)#', $this->entry, $result); - if (count($result)) { - $result = trim(preg_replace('/(?:^|\n)[\t ]*\*[\t ]?/', ' ', $result[1])); - } else { - $result = $this->isFunction() ? 'Function' : 'Unknown'; - } - $this->_type = $result; - return $result; - } -} -?> \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php b/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php deleted file mode 100644 index 5dc2583f8b..0000000000 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/node_modules/punycode/vendor/docdown/src/DocDown/Generator.php +++ /dev/null @@ -1,563 +0,0 @@ -\n"; - - /** - * An array of JSDoc entries. - * - * @memberOf Generator - * @type Array - */ - public $entries = array(); - - /** - * The HTML for the open tag. - * - * @static - * @memberOf Generator - * @type String - */ - public $openTag = "\n\n"; - - /** - * An options array used to configure the generator. - * - * @memberOf Generator - * @type Array - */ - public $options = array(); - - /** - * The file's source code. - * - * @memberOf Generator - * @type String - */ - public $source = ''; - - /*--------------------------------------------------------------------------*/ - - /** - * The Generator constructor. - * - * @constructor - * @param {String} $source The source code to parse. - * @param {Array} $options The options array. - */ - public function __construct( $source, $options = array() ) { - // juggle arguments - if (is_array($source)) { - $options = $source; - } else { - $options['source'] = $source; - } - if (isset($options['source']) && realpath($options['source'])) { - $options['path'] = $options['source']; - } - if (isset($options['path'])) { - preg_match('/(?<=\.)[a-z]+$/', $options['path'], $ext); - $options['source'] = file_get_contents($options['path']); - $ext = array_pop($ext); - - if (!isset($options['lang']) && $ext) { - $options['lang'] = $ext; - } - if (!isset($options['title'])) { - $options['title'] = ucfirst(basename($options['path'])) . ' API documentation'; - } - } - if (!isset($options['lang'])) { - $options['lang'] = 'js'; - } - if (!isset($options['toc'])) { - $options['toc'] = 'properties'; - } - - $this->options = $options; - $this->source = str_replace(PHP_EOL, "\n", $options['source']); - $this->entries = Entry::getEntries($this->source); - - foreach ($this->entries as $index => $value) { - $this->entries[$index] = new Entry($value, $this->source, $options['lang']); - } - } - - /*--------------------------------------------------------------------------*/ - - /** - * Performs common string formatting operations. - * - * @private - * @static - * @memberOf Generator - * @param {String} $string The string to format. - * @returns {String} The formatted string. - */ - private static function format( $string ) { - $counter = 0; - - // tokenize inline code snippets - preg_match_all('/`[^`]+`/', $string, $tokenized); - $tokenized = $tokenized[0]; - foreach ($tokenized as $snippet) { - $string = str_replace($snippet, '__token' . ($counter++) .'__', $string); - } - - // italicize parentheses - $string = preg_replace('/(^|\s)(\([^)]+\))/', '$1*$2*', $string); - - // mark numbers as inline code - $string = preg_replace('/[\t ](-?\d+(?:.\d+)?)(?!\.[^\n])/', ' `$1`', $string); - - // detokenize inline code snippets - $counter = 0; - foreach ($tokenized as $snippet) { - $string = str_replace('__token' . ($counter++) . '__', $snippet, $string); - } - - return trim($string); - } - - /** - * Modify a string by replacing named tokens with matching assoc. array values. - * - * @private - * @static - * @memberOf Generator - * @param {String} $string The string to modify. - * @param {Array|Object} $object The template object. - * @returns {String} The modified string. - */ - private static function interpolate( $string, $object ) { - preg_match_all('/#\{([^}]+)\}/', $string, $tokens); - $tokens = array_unique(array_pop($tokens)); - - foreach ($tokens as $token) { - $pattern = '/#\{' . $token . '\}/'; - $replacement = ''; - - if (is_object($object)) { - preg_match('/\(([^)]+?)\)$/', $token, $args); - $args = preg_split('/,\s*/', array_pop($args)); - $method = 'get' . ucfirst(str_replace('/\([^)]+?\)$/', '', $token)); - - if (method_exists($object, $method)) { - $replacement = (string) call_user_func_array(array($object, $method), $args); - } else if (isset($object->{$token})) { - $replacement = (string) $object->{$token}; - } - } else if (isset($object[$token])) { - $replacement = (string) $object[$token]; - } - $string = preg_replace($pattern, trim($replacement), $string); - } - return Generator::format($string); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Adds the given `$entries` to the `$result` array. - * - * @private - * @memberOf Generator - * @param {Array} $result The result array to modify. - * @param {Array} $entries The entries to add to the `$result`. - */ - private function addEntries( &$result, $entries ) { - foreach ($entries as $entry) { - // skip aliases - if ($entry->isAlias()) { - continue; - } - // name and description - array_push( - $result, - $this->openTag, - Generator::interpolate("### `#{member}#{separator}#{call}`\n# [Ⓢ](#{href} \"View in source\") [Ⓣ][1]\n\n#{desc}", $entry) - ); - - // @alias - if (count($aliases = $entry->getAliases())) { - array_push($result, '', '#### Aliases'); - foreach ($aliases as $index => $alias) { - $aliases[$index] = $alias->getName(); - } - $result[] = '*' . implode(', ', $aliases) . '*'; - } - // @param - if (count($params = $entry->getParams())) { - array_push($result, '', '#### Arguments'); - foreach ($params as $index => $param) { - $result[] = Generator::interpolate('#{num}. `#{name}` (#{type}): #{desc}', array( - 'desc' => $param[2], - 'name' => $param[1], - 'num' => $index + 1, - 'type' => $param[0] - )); - } - } - // @returns - if (count($returns = $entry->getReturns())) { - array_push( - $result, '', - '#### Returns', - Generator::interpolate('(#{type}): #{desc}', array('desc' => $returns[1], 'type' => $returns[0])) - ); - } - // @example - if ($example = $entry->getExample()) { - array_push($result, '', '#### Example', $example); - } - array_push($result, "\n* * *", $this->closeTag); - } - } - - /** - * Resolves the entry's hash used to navigate the documentation. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @param {String} $member The name of the member. - * @returns {String} The url hash. - */ - private function getHash( $entry, $member = '' ) { - $entry = is_numeric($entry) ? $this->entries[$entry] : $entry; - $member = !$member ? $entry->getMembers(0) : $member; - $result = ($member ? $member . ($entry->isPlugin() ? 'prototype' : '') : '') . $entry->getCall(); - $result = preg_replace('/\(\[|\[\]/', '', $result); - $result = preg_replace('/[ =|\'"{}.()\]]/', '', $result); - $result = preg_replace('/[[#,]/', '-', $result); - return strtolower($result); - } - - /** - * Resolves the entry's url for the specific line number. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @returns {String} The url. - */ - private function getLineUrl( $entry ) { - $entry = is_numeric($entry) ? $this->entries($entry) : $entry; - return $this->options['url'] . '#L' . $entry->getLineNumber(); - } - - /** - * Extracts the character used to separate the entry's name from its member. - * - * @private - * @memberOf Generator - * @param {Number|Object} $entry The entry object. - * @returns {String} The separator. - */ - private function getSeparator( $entry ) { - $entry = is_numeric($entry) ? $this->entries($entry) : $entry; - return $entry->isPlugin() ? '.prototype.' : '.'; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Generates Markdown from JSDoc entries. - * - * @memberOf Generator - * @returns {String} The rendered Markdown. - */ - public function generate() { - $api = array(); - $byCategory = $this->options['toc'] == 'categories'; - $categories = array(); - $closeTag = $this->closeTag; - $compiling = false; - $openTag = $this->openTag; - $result = array('# ' . $this->options['title']); - $toc = 'toc'; - - // initialize $api array - foreach ($this->entries as $entry) { - // skip invalid or private entries - $name = $entry->getName(); - if (!$name || $entry->isPrivate()) { - continue; - } - - $members = $entry->getMembers(); - $members = count($members) ? $members : array(''); - - foreach ($members as $member) { - // create api category arrays - if ($member && !isset($api[$member])) { - // create temporary entry to be replaced later - $api[$member] = new stdClass; - $api[$member]->static = array(); - $api[$member]->plugin = array(); - } - - // append entry to api member - if (!$member || $entry->isCtor() || ($entry->getType() == 'Object' && - !preg_match('/[=:]\s*(?:null|undefined)\s*[,;]?$/', $entry->entry))) { - - // assign the real entry, replacing the temporary entry if it exist - $member = ($member ? $member . ($entry->isPlugin() ? '#' : '.') : '') . $name; - $entry->static = @$api[$member] ? $api[$member]->static : array(); - $entry->plugin = @$api[$member] ? $api[$member]->plugin : array(); - - $api[$member] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->static[] = $alias; - } - } - else if ($entry->isStatic()) { - $api[$member]->static[] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->static[] = $alias; - } - } - else if (!$entry->isCtor()) { - $api[$member]->plugin[] = $entry; - foreach ($entry->getAliases() as $alias) { - $api[$member]->plugin[] = $alias; - } - } - } - } - - // add properties to each entry - foreach ($api as $entry) { - $entry->hash = $this->getHash($entry); - $entry->href = $this->getLineUrl($entry); - - $member = $entry->getMembers(0); - $member = ($member ? $member . ($entry->isPlugin() ? '.prototype.' : '.') : '') . $entry->getName(); - $entry->member = preg_replace('/' . $entry->getName() . '$/', '', $member); - - // add properties to static and plugin sub-entries - foreach (array('static', 'plugin') as $kind) { - foreach ($entry->{$kind} as $subentry) { - $subentry->hash = $this->getHash($subentry); - $subentry->href = $this->getLineUrl($subentry); - $subentry->member = $member; - $subentry->separator = $this->getSeparator($subentry); - } - } - } - - /*------------------------------------------------------------------------*/ - - // custom sort for root level entries - // TODO: see how well it handles deeper namespace traversal - function sortCompare($a, $b) { - $score = array( 'a' => 0, 'b' => 0); - foreach (array( 'a' => $a, 'b' => $b) as $key => $value) { - // capitalized properties are last - if (preg_match('/[#.][A-Z]/', $value)) { - $score[$key] = 0; - } - // lowercase prototype properties are next to last - else if (preg_match('/#[a-z]/', $value)) { - $score[$key] = 1; - } - // lowercase static properties next to first - else if (preg_match('/\.[a-z]/', $value)) { - $score[$key] = 2; - } - // root properties are first - else if (preg_match('/^[^#.]+$/', $value)) { - $score[$key] = 3; - } - } - $score = $score['b'] - $score['a']; - return $score ? $score : strcasecmp($a, $b); - } - - uksort($api, 'sortCompare'); - - // sort static and plugin sub-entries - foreach ($api as $entry) { - foreach (array('static', 'plugin') as $kind) { - $sortBy = array( 'a' => array(), 'b' => array(), 'c' => array() ); - foreach ($entry->{$kind} as $subentry) { - $name = $subentry->getName(); - // functions w/o ALL-CAPs names are last - $sortBy['a'][] = $subentry->getType() == 'Function' && !preg_match('/^[A-Z_]+$/', $name); - // ALL-CAPs properties first - $sortBy['b'][] = preg_match('/^[A-Z_]+$/', $name); - // lowercase alphanumeric sort - $sortBy['c'][] = strtolower($name); - } - array_multisort($sortBy['a'], SORT_ASC, $sortBy['b'], SORT_DESC, $sortBy['c'], SORT_ASC, $entry->{$kind}); - } - } - - /*------------------------------------------------------------------------*/ - - // add categories - foreach ($api as $entry) { - $categories[$entry->getCategory()][] = $entry; - foreach (array('static', 'plugin') as $kind) { - foreach ($entry->{$kind} as $subentry) { - $categories[$subentry->getCategory()][] = $subentry; - } - } - } - - // sort categories - ksort($categories); - - foreach(array('Methods', 'Properties') as $category) { - if (isset($categories[$category])) { - $entries = $categories[$category]; - unset($categories[$category]); - $categories[$category] = $entries; - } - } - - /*------------------------------------------------------------------------*/ - - // compile TOC - $result[] = $openTag; - - // compile TOC by categories - if ($byCategory) { - foreach ($categories as $category => $entries) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - // assign TOC hash - if (count($result) == 2) { - $toc = $category; - } - // add category - array_push( - $result, - $openTag, '## ' . (count($result) == 2 ? '' : '') . '`' . $category . '`' - ); - // add entries - foreach ($entries as $entry) { - $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $entry); - } - } - } - // compile TOC by namespace - else { - foreach ($api as $entry) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - $member = $entry->member . $entry->getName(); - - // assign TOC hash - if (count($result) == 2) { - $toc = $member; - } - // add root entry - array_push( - $result, - $openTag, '## ' . (count($result) == 2 ? '' : '') . '`' . $member . '`', - Generator::interpolate('* [`' . $member . '`](##{hash})', $entry) - ); - - // add static and plugin sub-entries - foreach (array('static', 'plugin') as $kind) { - if ($kind == 'plugin' && count($entry->plugin)) { - array_push( - $result, - $closeTag, - $openTag, - '## `' . $member . ($entry->isCtor() ? '.prototype`' : '`') - ); - } - foreach ($entry->{$kind} as $subentry) { - $subentry->member = $member; - $result[] = Generator::interpolate('* [`#{member}#{separator}#{name}`](##{hash})', $subentry); - } - } - } - } - - array_push($result, $closeTag, $closeTag); - - /*------------------------------------------------------------------------*/ - - // compile content - $compiling = false; - $result[] = $openTag; - - if ($byCategory) { - foreach ($categories as $category => $entries) { - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - if ($category != 'Methods' && $category != 'Properties') { - $category = '“' . $category . '” Methods'; - } - array_push($result, $openTag, '## `' . $category . '`'); - $this->addEntries($result, $entries); - } - } - else { - foreach ($api as $entry) { - // skip aliases - if ($entry->isAlias()) { - continue; - } - if ($compiling) { - $result[] = $closeTag; - } else { - $compiling = true; - } - // add root entry name - $member = $entry->member . $entry->getName(); - array_push($result, $openTag, '## `' . $member . '`'); - - foreach (array($entry, 'static', 'plugin') as $kind) { - $subentries = is_string($kind) ? $entry->{$kind} : array($kind); - - // add sub-entry name - if ($kind != 'static' && $entry->getType() != 'Object' && - count($subentries) && $subentries[0] != $kind) { - if ($kind == 'plugin') { - $result[] = $closeTag; - } - array_push( - $result, - $openTag, - '## `' . $member . ($kind == 'plugin' ? '.prototype`' : '`') - ); - } - $this->addEntries($result, $subentries); - } - } - } - - // close tags add TOC link reference - array_push($result, $closeTag, $closeTag, '', ' [1]: #' . $toc . ' "Jump back to the TOC."'); - - // cleanup whitespace - return trim(preg_replace('/[\t ]+\n/', "\n", join($result, "\n"))); - } -} -?> diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/package.json b/deps/npm/node_modules/request/node_modules/tough-cookie/package.json index e91645aa19..f4ede66898 100644 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/package.json +++ b/deps/npm/node_modules/request/node_modules/tough-cookie/package.json @@ -1,9 +1,8 @@ { "author": { - "name": "Jeremy Stashewsky", - "email": "jeremy@goinstant.com", - "url": "https://github.com/stash" + "name": "GoInstant Inc., a salesforce.com company" }, + "license": "MIT", "name": "tough-cookie", "description": "RFC6265 Cookies and Cookie Jar for node.js", "keywords": [ @@ -16,14 +15,14 @@ "RFC6265", "RFC2965" ], - "version": "0.9.15", - "homepage": "https://github.com/goinstant/node-cookie", + "version": "0.12.1", + "homepage": "https://github.com/goinstant/tough-cookie", "repository": { "type": "git", - "url": "git://github.com/goinstant/node-cookie.git" + "url": "git://github.com/goinstant/tough-cookie.git" }, "bugs": { - "url": "https://github.com/goinstant/node-cookie/issues" + "url": "https://github.com/goinstant/tough-cookie/issues" }, "main": "./lib/cookie", "scripts": { @@ -36,11 +35,33 @@ "punycode": ">=0.2.0" }, "devDependencies": { - "vows": ">=0.6.0", + "vows": "0.7.0", "async": ">=0.1.12" }, - "readme": "[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)\n\n# Synopsis\n\n``` javascript\nvar cookies = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'\nvar Cookie = cookies.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new cookies.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nRequires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\ncookies\n=======\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\nparseDate(string[,strict])\n-----------------\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. \"Thu, 01 Jan 1970 00:00:010 GMT\" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).\n\nformatDate(date)\n----------------\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\ncanonicalDomain(str)\n--------------------\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\ndomainMatch(str,domStr[,canonicalize=true])\n-------------------------------------------\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\ndefaultPath(path)\n-----------------\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\npathMatch(reqPath,cookiePath)\n-----------------------------\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\nparse(header[,strict=false])\n----------------------------\n\nalias for `Cookie.parse(header[,strict])`\n\nfromJSON(string)\n----------------\n\nalias for `Cookie.fromJSON(string)`\n\ngetPublicSuffix(hostname)\n-------------------------\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\ncookieCompare(a,b)\n------------------\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\npermuteDomain(domain)\n---------------------\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n\npermutePath(path)\n-----------------\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\nCookie\n======\n\nCookie.parse(header[,strict=false])\n-----------------------------------\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(Cookie.parse);\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\nCookie.fromJSON(string)\n-----------------------\n\nConvert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.\n\nProperties\n==========\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n \nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _created_ - `Date` - when this cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\nConstruction([{options}])\n------------\n\nReceives an options object that can contain any Cookie properties, uses the default for unspecified properties.\n\n.toString()\n-----------\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n.cookieString()\n---------------\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n.setExpires(String)\n-------------------\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n.setMaxAge(number)\n-------------------\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n.expiryTime([now=Date.now()])\n-----------------------------\n\n.expiryDate([now=Date.now()])\n-----------------------------\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n.TTL([now=Date.now()])\n---------\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n.canonicalizedDoman()\n---------------------\n\n.cdomain()\n----------\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n.validate()\n-----------\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\nCookieJar\n=========\n\nConstruction([store = new MemoryCookieStore()][, rejectPublicSuffixes])\n------------\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\n\nAttributes\n----------\n\n * _rejectPublicSuffixes_ - boolean - reject cookies with domains like \"com\" and \"co.uk\" (default: `true`)\n \nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))\n-------------------------------------------------------------------\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _strict_ - boolean - default `false` - perform extra checks\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n.storeCookie(cookie, [{options},] cb(err,cookie))\n-------------------------------------------------\n\n__REMOVED__ removed in lieu of the CookieStore API below\n \n.getCookies(currentUrl, [{options},] cb(err,cookies))\n-----------------------------------------------------\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n.getCookieString(...)\n---------------------\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n.getSetCookieStrings(...)\n-------------------------\n\nAccepts the same options as `.getCookies()` but passes an array of strings suitable for Set-Cookie headers (rather than an array of `Cookie`s) to the callback. Simply maps the cookie array via `.toString()`.\n\n# CookieStore API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\nstore.findCookie(domain, path, key, cb(err,cookie))\n---------------------------------------------------\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\nstore.findCookies(domain, path, cb(err,cookies))\n------------------------------------------------\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\nstore.putCookie(cookie, cb(err))\n--------------------------------\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\nstore.updateCookie(oldCookie, newCookie, cb(err))\n-------------------------------------------------\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\nstore.removeCookie(domain, path, key, cb(err))\n----------------------------------------------\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\nstore.removeCookies(domain, path, cb(err))\n------------------------------------------\n\nRemoves matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n# TODO\n\n * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`\n * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891\n * better tests for `validate()`?\n\n# Copyright and License\n\n(tl;dr: MIT with some MPL/1.1)\n\nCopyright GoInstant, Inc. and other contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\nPortions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.\n", + "readme": "[RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js\n\n![Tough Cookie](http://www.goinstant.com.s3.amazonaws.com/tough-cookie.jpg)\n\n[![Build Status](https://travis-ci.org/goinstant/node-cookie.png?branch=master)](https://travis-ci.org/goinstant/node-cookie)\n\n[![NPM Stats](https://nodei.co/npm/tough-cookie.png?downloads=true&stars=true)](https://npmjs.org/package/tough-cookie)\n![NPM Downloads](https://nodei.co/npm-dl/tough-cookie.png?months=9)\n\n# Synopsis\n\n``` javascript\nvar tough = require('tough-cookie'); // note: not 'cookie', 'cookies' or 'node-cookie'\nvar Cookie = tough.Cookie;\nvar cookie = Cookie.parse(header);\ncookie.value = 'somethingdifferent';\nheader = cookie.toString();\n\nvar cookiejar = new tough.CookieJar();\ncookiejar.setCookie(cookie, 'http://currentdomain.example.com/path', cb);\n// ...\ncookiejar.getCookies('http://example.com/otherpath',function(err,cookies) {\n res.headers['cookie'] = cookies.join('; ');\n});\n```\n\n# Installation\n\nIt's _so_ easy!\n\n`npm install tough-cookie`\n\nRequires `punycode`, which should get installed automatically for you. Note that node.js v0.6.2+ bundles punycode by default.\n\nWhy the name? NPM modules `cookie`, `cookies` and `cookiejar` were already taken.\n\n# API\n\ntough\n=====\n\nFunctions on the module you get from `require('tough-cookie')`. All can be used as pure functions and don't need to be \"bound\".\n\nparseDate(string[,strict])\n-----------------\n\nParse a cookie date string into a `Date`. Parses according to RFC6265 Section 5.1.1, not `Date.parse()`. If strict is set to true then leading/trailing non-seperator characters around the time part will cause the parsing to fail (e.g. \"Thu, 01 Jan 1970 00:00:010 GMT\" has an extra trailing zero but Chrome, an assumedly RFC-compliant browser, treats this as valid).\n\nformatDate(date)\n----------------\n\nFormat a Date into a RFC1123 string (the RFC6265-recommended format).\n\ncanonicalDomain(str)\n--------------------\n\nTransforms a domain-name into a canonical domain-name. The canonical domain-name is a trimmed, lowercased, stripped-of-leading-dot and optionally punycode-encoded domain-name (Section 5.1.2 of RFC6265). For the most part, this function is idempotent (can be run again on its output without ill effects).\n\ndomainMatch(str,domStr[,canonicalize=true])\n-------------------------------------------\n\nAnswers \"does this real domain match the domain in a cookie?\". The `str` is the \"current\" domain-name and the `domStr` is the \"cookie\" domain-name. Matches according to RFC6265 Section 5.1.3, but it helps to think of it as a \"suffix match\".\n\nThe `canonicalize` parameter will run the other two paramters through `canonicalDomain` or not.\n\ndefaultPath(path)\n-----------------\n\nGiven a current request/response path, gives the Path apropriate for storing in a cookie. This is basically the \"directory\" of a \"file\" in the path, but is specified by Section 5.1.4 of the RFC.\n\nThe `path` parameter MUST be _only_ the pathname part of a URI (i.e. excludes the hostname, query, fragment, etc.). This is the `.pathname` property of node's `uri.parse()` output.\n\npathMatch(reqPath,cookiePath)\n-----------------------------\n\nAnswers \"does the request-path path-match a given cookie-path?\" as per RFC6265 Section 5.1.4. Returns a boolean.\n\nThis is essentially a prefix-match where `cookiePath` is a prefix of `reqPath`.\n\nparse(header[,strict=false])\n----------------------------\n\nalias for `Cookie.parse(header[,strict])`\n\nfromJSON(string)\n----------------\n\nalias for `Cookie.fromJSON(string)`\n\ngetPublicSuffix(hostname)\n-------------------------\n\nReturns the public suffix of this hostname. The public suffix is the shortest domain-name upon which a cookie can be set. Returns `null` if the hostname cannot have cookies set for it.\n\nFor example: `www.example.com` and `www.subdomain.example.com` both have public suffix `example.com`.\n\nFor further information, see http://publicsuffix.org/. This module derives its list from that site.\n\ncookieCompare(a,b)\n------------------\n\nFor use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2). Longest `.path`s go first, then sorted oldest to youngest.\n\n``` javascript\nvar cookies = [ /* unsorted array of Cookie objects */ ];\ncookies = cookies.sort(cookieCompare);\n```\n\npermuteDomain(domain)\n---------------------\n\nGenerates a list of all possible domains that `domainMatch()` the parameter. May be handy for implementing cookie stores.\n\n\npermutePath(path)\n-----------------\n\nGenerates a list of all possible paths that `pathMatch()` the parameter. May be handy for implementing cookie stores.\n\nCookie\n======\n\nCookie.parse(header[,strict=false])\n-----------------------------------\n\nParses a single Cookie or Set-Cookie HTTP header into a `Cookie` object. Returns `undefined` if the string can't be parsed. If in strict mode, returns `undefined` if the cookie doesn't follow the guidelines in section 4 of RFC6265. Generally speaking, strict mode can be used to validate your own generated Set-Cookie headers, but acting as a client you want to be lenient and leave strict mode off.\n\nHere's how to process the Set-Cookie header(s) on a node HTTP/HTTPS response:\n\n``` javascript\nif (res.headers['set-cookie'] instanceof Array)\n cookies = res.headers['set-cookie'].map(function (c) { return (Cookie.parse(c)); });\nelse\n cookies = [Cookie.parse(res.headers['set-cookie'])];\n```\n\nCookie.fromJSON(string)\n-----------------------\n\nConvert a JSON string to a `Cookie` object. Does a `JSON.parse()` and converts the `.created`, `.lastAccessed` and `.expires` properties into `Date` objects.\n\nProperties\n==========\n\n * _key_ - string - the name or key of the cookie (default \"\")\n * _value_ - string - the value of the cookie (default \"\")\n * _expires_ - `Date` - if set, the `Expires=` attribute of the cookie (defaults to the string `\"Infinity\"`). See `setExpires()`\n * _maxAge_ - seconds - if set, the `Max-Age=` attribute _in seconds_ of the cookie. May also be set to strings `\"Infinity\"` and `\"-Infinity\"` for non-expiry and immediate-expiry, respectively. See `setMaxAge()`\n * _domain_ - string - the `Domain=` attribute of the cookie\n * _path_ - string - the `Path=` of the cookie\n * _secure_ - boolean - the `Secure` cookie flag\n * _httpOnly_ - boolean - the `HttpOnly` cookie flag\n * _extensions_ - `Array` - any unrecognized cookie attributes as strings (even if equal-signs inside)\n\nAfter a cookie has been passed through `CookieJar.setCookie()` it will have the following additional attributes:\n\n * _hostOnly_ - boolean - is this a host-only cookie (i.e. no Domain field was set, but was instead implied)\n * _pathIsDefault_ - boolean - if true, there was no Path field on the cookie and `defaultPath()` was used to derive one.\n * _created_ - `Date` - when this cookie was added to the jar\n * _lastAccessed_ - `Date` - last time the cookie got accessed. Will affect cookie cleaning once implemented. Using `cookiejar.getCookies(...)` will update this attribute.\n\nConstruction([{options}])\n------------\n\nReceives an options object that can contain any Cookie properties, uses the default for unspecified properties.\n\n.toString()\n-----------\n\nencode to a Set-Cookie header value. The Expires cookie field is set using `formatDate()`, but is omitted entirely if `.expires` is `Infinity`.\n\n.cookieString()\n---------------\n\nencode to a Cookie header value (i.e. the `.key` and `.value` properties joined with '=').\n\n.setExpires(String)\n-------------------\n\nsets the expiry based on a date-string passed through `parseDate()`. If parseDate returns `null` (i.e. can't parse this date string), `.expires` is set to `\"Infinity\"` (a string) is set.\n\n.setMaxAge(number)\n-------------------\n\nsets the maxAge in seconds. Coerces `-Infinity` to `\"-Infinity\"` and `Infinity` to `\"Infinity\"` so it JSON serializes correctly.\n\n.expiryTime([now=Date.now()])\n-----------------------------\n\n.expiryDate([now=Date.now()])\n-----------------------------\n\nexpiryTime() Computes the absolute unix-epoch milliseconds that this cookie expires. expiryDate() works similarly, except it returns a `Date` object. Note that in both cases the `now` parameter should be milliseconds.\n\nMax-Age takes precedence over Expires (as per the RFC). The `.created` attribute -- or, by default, the `now` paramter -- is used to offset the `.maxAge` attribute.\n\nIf Expires (`.expires`) is set, that's returned.\n\nOtherwise, `expiryTime()` returns `Infinity` and `expiryDate()` returns a `Date` object for \"Tue, 19 Jan 2038 03:14:07 GMT\" (latest date that can be expressed by a 32-bit `time_t`; the common limit for most user-agents).\n\n.TTL([now=Date.now()])\n---------\n\ncompute the TTL relative to `now` (milliseconds). The same precedence rules as for `expiryTime`/`expiryDate` apply.\n\nThe \"number\" `Infinity` is returned for cookies without an explicit expiry and `0` is returned if the cookie is expired. Otherwise a time-to-live in milliseconds is returned.\n\n.canonicalizedDoman()\n---------------------\n\n.cdomain()\n----------\n\nreturn the canonicalized `.domain` field. This is lower-cased and punycode (RFC3490) encoded if the domain has any non-ASCII characters.\n\n.validate()\n-----------\n\nStatus: *IN PROGRESS*. Works for a few things, but is by no means comprehensive.\n\nvalidates cookie attributes for semantic correctness. Useful for \"lint\" checking any Set-Cookie headers you generate. For now, it returns a boolean, but eventually could return a reason string -- you can future-proof with this construct:\n\n``` javascript\nif (cookie.validate() === true) {\n // it's tasty\n} else {\n // yuck!\n}\n```\n\nCookieJar\n=========\n\nConstruction([store = new MemoryCookieStore()][, rejectPublicSuffixes])\n------------\n\nSimply use `new CookieJar()`. If you'd like to use a custom store, pass that to the constructor otherwise a `MemoryCookieStore` will be created and used.\n\n\nAttributes\n----------\n\n * _rejectPublicSuffixes_ - boolean - reject cookies with domains like \"com\" and \"co.uk\" (default: `true`)\n\nSince eventually this module would like to support database/remote/etc. CookieJars, continuation passing style is used for CookieJar methods.\n\n.setCookie(cookieOrString, currentUrl, [{options},] cb(err,cookie))\n-------------------------------------------------------------------\n\nAttempt to set the cookie in the cookie jar. If the operation fails, an error will be given to the callback `cb`, otherwise the cookie is passed through. The cookie will have updated `.created`, `.lastAccessed` and `.hostOnly` properties.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _strict_ - boolean - default `false` - perform extra checks\n * _ignoreError_ - boolean - default `false` - silently ignore things like parse errors and invalid domains. CookieStore errors aren't ignored by this option.\n\nAs per the RFC, the `.hostOnly` property is set if there was no \"Domain=\" parameter in the cookie string (or `.domain` was null on the Cookie object). The `.domain` property is set to the fully-qualified hostname of `currentUrl` in this case. Matching this cookie requires an exact hostname match (not a `domainMatch` as per usual).\n\n.setCookieSync(cookieOrString, currentUrl, [{options}])\n-------------------------------------------------------\n\nSynchronous version of `setCookie`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\n.storeCookie(cookie, [{options},] cb(err,cookie))\n-------------------------------------------------\n\n__REMOVED__ removed in lieu of the CookieStore API below\n\n.getCookies(currentUrl, [{options},] cb(err,cookies))\n-----------------------------------------------------\n\nRetrieve the list of cookies that can be sent in a Cookie header for the current url.\n\nIf an error is encountered, that's passed as `err` to the callback, otherwise an `Array` of `Cookie` objects is passed. The array is sorted with `cookieCompare()` unless the `{sort:false}` option is given.\n\nThe `options` object can be omitted and can have the following properties:\n\n * _http_ - boolean - default `true` - indicates if this is an HTTP or non-HTTP API. Affects HttpOnly cookies.\n * _secure_ - boolean - autodetect from url - indicates if this is a \"Secure\" API. If the currentUrl starts with `https:` or `wss:` then this is defaulted to `true`, otherwise `false`.\n * _now_ - Date - default `new Date()` - what to use for the creation/access time of cookies\n * _expire_ - boolean - default `true` - perform expiry-time checking of cookies and asynchronously remove expired cookies from the store. Using `false` will return expired cookies and **not** remove them from the store (which is useful for replaying Set-Cookie headers, potentially).\n * _allPaths_ - boolean - default `false` - if `true`, do not scope cookies by path. The default uses RFC-compliant path scoping. **Note**: may not be supported by the CookieStore `fetchCookies` function (the default MemoryCookieStore supports it).\n\nThe `.lastAccessed` property of the returned cookies will have been updated.\n\n.getCookiesSync(currentUrl, [{options}])\n----------------------------------------\n\nSynchronous version of `getCookies`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\n.getCookieString(...)\n---------------------\n\nAccepts the same options as `.getCookies()` but passes a string suitable for a Cookie header rather than an array to the callback. Simply maps the `Cookie` array via `.cookieString()`.\n\n.getCookieStringSync(...)\n-------------------------\n\nSynchronous version of `getCookieString`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\n.getSetCookieStrings(...)\n-------------------------\n\nReturns an array of strings suitable for **Set-Cookie** headers. Accepts the same options as `.getCookies()`. Simply maps the cookie array via `.toString()`.\n\n.getSetCookieStringsSync(...)\n-----------------------------\n\nSynchronous version of `getSetCookieStrings`; only works with synchronous stores (e.g. the default `MemoryCookieStore`).\n\nStore\n=====\n\nBase class for CookieJar stores.\n\n# CookieStore API\n\nThe storage model for each `CookieJar` instance can be replaced with a custom implementation. The default is `MemoryCookieStore` which can be found in the `lib/memstore.js` file. The API uses continuation-passing-style to allow for asynchronous stores.\n\nStores should inherit from the base `Store` class, which is available as `require('tough-cookie').Store`. Stores are asynchronous by default, but if `store.synchronous` is set, then the `*Sync` methods on the CookieJar can be used.\n\nAll `domain` parameters will have been normalized before calling.\n\nThe Cookie store must have all of the following methods.\n\nstore.findCookie(domain, path, key, cb(err,cookie))\n---------------------------------------------------\n\nRetrieve a cookie with the given domain, path and key (a.k.a. name). The RFC maintains that exactly one of these cookies should exist in a store. If the store is using versioning, this means that the latest/newest such cookie should be returned.\n\nCallback takes an error and the resulting `Cookie` object. If no cookie is found then `null` MUST be passed instead (i.e. not an error).\n\nstore.findCookies(domain, path, cb(err,cookies))\n------------------------------------------------\n\nLocates cookies matching the given domain and path. This is most often called in the context of `cookiejar.getCookies()` above.\n\nIf no cookies are found, the callback MUST be passed an empty array.\n\nThe resulting list will be checked for applicability to the current request according to the RFC (domain-match, path-match, http-only-flag, secure-flag, expiry, etc.), so it's OK to use an optimistic search algorithm when implementing this method. However, the search algorithm used SHOULD try to find cookies that `domainMatch()` the domain and `pathMatch()` the path in order to limit the amount of checking that needs to be done.\n\nAs of version 0.9.12, the `allPaths` option to `cookiejar.getCookies()` above will cause the path here to be `null`. If the path is `null`, path-matching MUST NOT be performed (i.e. domain-matching only).\n\nstore.putCookie(cookie, cb(err))\n--------------------------------\n\nAdds a new cookie to the store. The implementation SHOULD replace any existing cookie with the same `.domain`, `.path`, and `.key` properties -- depending on the nature of the implementation, it's possible that between the call to `fetchCookie` and `putCookie` that a duplicate `putCookie` can occur.\n\nThe `cookie` object MUST NOT be modified; the caller will have already updated the `.creation` and `.lastAccessed` properties.\n\nPass an error if the cookie cannot be stored.\n\nstore.updateCookie(oldCookie, newCookie, cb(err))\n-------------------------------------------------\n\nUpdate an existing cookie. The implementation MUST update the `.value` for a cookie with the same `domain`, `.path` and `.key`. The implementation SHOULD check that the old value in the store is equivalent to `oldCookie` - how the conflict is resolved is up to the store.\n\nThe `.lastAccessed` property will always be different between the two objects and `.created` will always be the same. Stores MAY ignore or defer the `.lastAccessed` change at the cost of affecting how cookies are sorted (or selected for deletion).\n\nStores may wish to optimize changing the `.value` of the cookie in the store versus storing a new cookie. If the implementation doesn't define this method a stub that calls `putCookie(newCookie,cb)` will be added to the store object.\n\nThe `newCookie` and `oldCookie` objects MUST NOT be modified.\n\nPass an error if the newCookie cannot be stored.\n\nstore.removeCookie(domain, path, key, cb(err))\n----------------------------------------------\n\nRemove a cookie from the store (see notes on `findCookie` about the uniqueness constraint).\n\nThe implementation MUST NOT pass an error if the cookie doesn't exist; only pass an error due to the failure to remove an existing cookie.\n\nstore.removeCookies(domain, path, cb(err))\n------------------------------------------\n\nRemoves matching cookies from the store. The `path` paramter is optional, and if missing means all paths in a domain should be removed.\n\nPass an error ONLY if removing any existing cookies failed.\n\n# TODO\n\n * _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`\n * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891\n * better tests for `validate()`?\n\n# Copyright and License\n\n(tl;dr: MIT with some MPL/1.1)\n\nCopyright 2012- GoInstant, Inc. and other contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to\ndeal in the Software without restriction, including without limitation the\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\nsell copies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\nIN THE SOFTWARE.\n\nPortions may be licensed under different licenses (in particular public-suffix.txt is MPL/1.1); please read the LICENSE file for full details.\n", "readmeFilename": "README.md", - "_id": "tough-cookie@0.9.15", - "_from": "tough-cookie@~0.9.15" + "_id": "tough-cookie@0.12.1", + "dist": { + "shasum": "8220c7e21abd5b13d96804254bd5a81ebf2c7d62", + "tarball": "http://registry.npmjs.org/tough-cookie/-/tough-cookie-0.12.1.tgz" + }, + "_from": "tough-cookie@>=0.12.0", + "_npmVersion": "1.3.11", + "_npmUser": { + "name": "goinstant", + "email": "support@goinstant.com" + }, + "maintainers": [ + { + "name": "jstash", + "email": "jeremy@goinstant.com" + }, + { + "name": "goinstant", + "email": "services@goinstant.com" + } + ], + "directories": {}, + "_shasum": "8220c7e21abd5b13d96804254bd5a81ebf2c7d62", + "_resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-0.12.1.tgz" } diff --git a/deps/npm/node_modules/request/node_modules/tough-cookie/test.js b/deps/npm/node_modules/request/node_modules/tough-cookie/test.js index 3cce815e76..5cbf536ca2 100644 --- a/deps/npm/node_modules/request/node_modules/tough-cookie/test.js +++ b/deps/npm/node_modules/request/node_modules/tough-cookie/test.js @@ -18,7 +18,7 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ - +'use strict'; var vows = require('vows'); var assert = require('assert'); var async = require('async'); @@ -31,7 +31,7 @@ var CookieJar = tough.CookieJar; function dateVows(table) { var theVows = { }; - var keys = Object.keys(table).forEach(function(date) { + Object.keys(table).forEach(function(date) { var expect = table[date]; theVows[date] = function() { var got = tough.parseDate(date) ? 'valid' : 'invalid'; @@ -69,7 +69,7 @@ function defaultPathVows(table) { } var atNow = Date.now(); -function at(offset) { return {now: new Date(atNow+offset)} } +function at(offset) { return {now: new Date(atNow+offset)}; } vows.describe('Cookie Jar') .addBatch({ @@ -135,8 +135,8 @@ vows.describe('Cookie Jar') "doesn't validate": function(c) { assert.ok(!c.validate()); }, - "to string": function(c) { - assert.equal(c.toString(), 'a="beta gamma"'); + "'garbage in, garbage out'": function(c) { + assert.equal(c.toString(), 'a=beta gamma'); }, }, "with an empty value and HttpOnly": { @@ -277,7 +277,7 @@ vows.describe('Cookie Jar') assert.ok(c.isPersistent()); }, "default TTL": { - topic: function() { return new Cookie() }, + topic: function() { return new Cookie(); }, "is Infinite-future": function(c) { assert.equal(c.TTL(), Infinity) }, "is a 'session' cookie": function(c) { assert.ok(!c.isPersistent()) }, }, @@ -507,7 +507,64 @@ vows.describe('Cookie Jar') assert.equal(c.expires.getTime(), 1397700749000); }, "httponly": function(c) { assert.ok(c.httpOnly) }, - } + }, + "spaces in value": { + "strict": { + topic: function() { + return Cookie.parse('a=one two three',true) || null; + }, + "did not parse": function(c) { assert.isNull(c) }, + }, + "non-strict": { + topic: function() { + return Cookie.parse('a=one two three',false) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'a') }, + "value": function(c) { assert.equal(c.value, 'one two three') }, + "no path": function(c) { assert.equal(c.path, null) }, + "no domain": function(c) { assert.equal(c.domain, null) }, + "no extensions": function(c) { assert.ok(!c.extensions) }, + }, + }, + "quoted spaces in value": { + "strict": { + topic: function() { + return Cookie.parse('a="one two three"',true) || null; + }, + "did not parse": function(c) { assert.isNull(c) }, + }, + "non-strict": { + topic: function() { + return Cookie.parse('a="one two three"',false) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'a') }, + "value": function(c) { assert.equal(c.value, 'one two three') }, + "no path": function(c) { assert.equal(c.path, null) }, + "no domain": function(c) { assert.equal(c.domain, null) }, + "no extensions": function(c) { assert.ok(!c.extensions) }, + } + }, + "non-ASCII in value": { + "strict": { + topic: function() { + return Cookie.parse('farbe=weiß',true) || null; + }, + "did not parse": function(c) { assert.isNull(c) }, + }, + "non-strict": { + topic: function() { + return Cookie.parse('farbe=weiß',false) || null; + }, + "parsed": function(c) { assert.ok(c) }, + "key": function(c) { assert.equal(c.key, 'farbe') }, + "value": function(c) { assert.equal(c.value, 'weiß') }, + "no path": function(c) { assert.equal(c.path, null) }, + "no domain": function(c) { assert.equal(c.domain, null) }, + "no extensions": function(c) { assert.ok(!c.extensions) }, + }, + }, } }) .addBatch({ @@ -706,6 +763,20 @@ vows.describe('Cookie Jar') assert.equal(c.domain, 'example.com'); }, }, + "Setting a sub-path cookie on a super-domain": { + topic: function() { + var cj = new CookieJar(); + var c = Cookie.parse("a=b; Domain=example.com; Path=/subpath"); + assert.strictEqual(c.hostOnly, null); + assert.instanceOf(c.creation, Date); + assert.strictEqual(c.lastAccessed, null); + c.creation = new Date(Date.now()-10000); + cj.setCookie(c, 'http://www.example.com/index.html', this.callback); + }, + "domain is super-domain": function(c) { assert.equal(c.domain, 'example.com') }, + "path is /subpath": function(c) { assert.equal(c.path, '/subpath') }, + "path was NOT derived": function(c) { assert.strictEqual(c.pathIsDefault, null) }, + }, "Setting HttpOnly cookie over non-HTTP API": { topic: function() { var cj = new CookieJar(); @@ -755,10 +826,13 @@ vows.describe('Cookie Jar') }); }, "setup ok": function(err,cj,results) { - assert.ok(1); + assert.ok(!err); + assert.ok(cj); + assert.ok(results); }, "then retrieving for http://nodejs.org": { - topic: function(cj,results) { + topic: function(cj,oldResults) { + assert.ok(oldResults); cj.getCookies('http://nodejs.org',this.callback); }, "get a nodejs cookie": function(cookies) { @@ -768,7 +842,8 @@ vows.describe('Cookie Jar') }, }, "then retrieving for https://example.com": { - topic: function(cj,results) { + topic: function(cj,oldResults) { + assert.ok(oldResults); cj.getCookies('https://example.com',{secure:true},this.callback); }, "get a secure example cookie with others": function(cookies) { @@ -777,7 +852,8 @@ vows.describe('Cookie Jar') }, }, "then retrieving for https://example.com (missing options)": { - topic: function(cj,results) { + topic: function(cj,oldResults) { + assert.ok(oldResults); cj.getCookies('https://example.com',this.callback); }, "get a secure example cookie with others": function(cookies) { @@ -786,7 +862,8 @@ vows.describe('Cookie Jar') }, }, "then retrieving for http://example.com": { - topic: function(cj,results) { + topic: function(cj,oldResults) { + assert.ok(oldResults); cj.getCookies('http://example.com',this.callback); }, "get a bunch of cookies": function(cookies) { @@ -795,7 +872,8 @@ vows.describe('Cookie Jar') }, }, "then retrieving for http://EXAMPlE.com": { - topic: function(cj,results) { + topic: function(cj,oldResults) { + assert.ok(oldResults); cj.getCookies('http://EXAMPlE.com',this.callback); }, "get a bunch of cookies": function(cookies) { @@ -804,7 +882,8 @@ vows.describe('Cookie Jar') }, }, "then retrieving for http://example.com, non-HTTP": { - topic: function(cj,results) { + topic: function(cj,oldResults) { + assert.ok(oldResults); cj.getCookies('http://example.com',{http:false},this.callback); }, "get a bunch of cookies": function(cookies) { @@ -813,7 +892,8 @@ vows.describe('Cookie Jar') }, }, "then retrieving for http://example.com/foo/bar": { - topic: function(cj,results) { + topic: function(cj,oldResults) { + assert.ok(oldResults); cj.getCookies('http://example.com/foo/bar',this.callback); }, "get a bunch of cookies": function(cookies) { @@ -822,7 +902,8 @@ vows.describe('Cookie Jar') }, }, "then retrieving for http://example.com as a string": { - topic: function(cj,results) { + topic: function(cj,oldResults) { + assert.ok(oldResults); cj.getCookieString('http://example.com',this.callback); }, "get a single string": function(cookieHeader) { @@ -830,7 +911,8 @@ vows.describe('Cookie Jar') }, }, "then retrieving for http://example.com as a set-cookie header": { - topic: function(cj,results) { + topic: function(cj,oldResults) { + assert.ok(oldResults); cj.getSetCookieStrings('http://example.com',this.callback); }, "get a single string": function(cookieHeaders) { @@ -841,7 +923,8 @@ vows.describe('Cookie Jar') }, }, "then retrieving for http://www.example.com/": { - topic: function(cj,results) { + topic: function(cj,oldResults) { + assert.ok(oldResults); cj.getCookies('http://www.example.com/foo/bar',this.callback); }, "get a bunch of cookies": function(cookies) { @@ -909,6 +992,7 @@ vows.describe('Cookie Jar') topic: function() { var cb = this.callback; var next = function (err,c) { + c = null; return cb(err,cj); }; var cj = new CookieJar(); @@ -916,11 +1000,16 @@ vows.describe('Cookie Jar') }, "initial cookie is set": function(err,cj) { assert.ok(!err); + assert.ok(cj); }, "but when trying to overwrite": { topic: function(cj) { var cb = this.callback; - cj.setCookie('k=12; Domain=example.ca; Path=/','http://example.ca',{http:false},function(err,c) {cb(null,err)}); + var next = function(err,c) { + c = null; + cb(null,err); + }; + cj.setCookie('k=12; Domain=example.ca; Path=/','http://example.ca',{http:false},next); }, "it's an error": function(err) { assert.ok(err); @@ -1337,4 +1426,200 @@ vows.describe('Cookie Jar') }, } }) +.addBatch({ + "remove cookies": { + topic: function() { + var jar = new CookieJar(); + var cookie = Cookie.parse("a=b; Domain=example.com; Path=/"); + var cookie2 = Cookie.parse("a=b; Domain=foo.com; Path=/"); + var cookie3 = Cookie.parse("foo=bar; Domain=foo.com; Path=/"); + jar.setCookie(cookie, 'http://example.com/index.html', function(){}); + jar.setCookie(cookie2, 'http://foo.com/index.html', function(){}); + jar.setCookie(cookie3, 'http://foo.com/index.html', function(){}); + return jar; + }, + "all from matching domain": function(jar){ + jar.store.removeCookies('example.com',null, function(err) { + assert(err == null); + + jar.store.findCookies('example.com', null, function(err, cookies){ + assert(err == null); + assert(cookies != null); + assert(cookies.length === 0, 'cookie was not removed'); + }); + + jar.store.findCookies('foo.com', null, function(err, cookies){ + assert(err == null); + assert(cookies != null); + assert(cookies.length === 2, 'cookies should not have been removed'); + }); + }); + }, + "from cookie store matching domain and key": function(jar){ + jar.store.removeCookie('foo.com', '/', 'foo', function(err) { + assert(err == null); + + jar.store.findCookies('foo.com', null, function(err, cookies){ + assert(err == null); + assert(cookies != null); + assert(cookies.length === 1, 'cookie was not removed correctly'); + assert(cookies[0].key === 'a', 'wrong cookie was removed'); + }); + }); + } + } +}) +.addBatch({ + "Synchronous CookieJar": { + "setCookieSync": { + topic: function() { + var jar = new CookieJar(); + var cookie = Cookie.parse("a=b; Domain=example.com; Path=/"); + cookie = jar.setCookieSync(cookie, 'http://example.com/index.html'); + return cookie; + }, + "returns a copy of the cookie": function(cookie) { + assert.instanceOf(cookie, Cookie); + } + }, + + "setCookieSync strict parse error": { + topic: function() { + var jar = new CookieJar(); + var opts = { strict: true }; + try { + jar.setCookieSync("farbe=weiß", 'http://example.com/index.html', opts); + return false; + } catch (e) { + return e; + } + }, + "throws the error": function(err) { + assert.instanceOf(err, Error); + assert.equal(err.message, "Cookie failed to parse"); + } + }, + + "getCookiesSync": { + topic: function() { + var jar = new CookieJar(); + var url = 'http://example.com/index.html'; + jar.setCookieSync("a=b; Domain=example.com; Path=/", url); + jar.setCookieSync("c=d; Domain=example.com; Path=/", url); + return jar.getCookiesSync(url); + }, + "returns the cookie array": function(err, cookies) { + assert.ok(!err); + assert.ok(Array.isArray(cookies)); + assert.lengthOf(cookies, 2); + cookies.forEach(function(cookie) { + assert.instanceOf(cookie, Cookie); + }); + } + }, + + "getCookieStringSync": { + topic: function() { + var jar = new CookieJar(); + var url = 'http://example.com/index.html'; + jar.setCookieSync("a=b; Domain=example.com; Path=/", url); + jar.setCookieSync("c=d; Domain=example.com; Path=/", url); + return jar.getCookieStringSync(url); + }, + "returns the cookie header string": function(err, str) { + assert.ok(!err); + assert.typeOf(str, 'string'); + } + }, + + "getSetCookieStringsSync": { + topic: function() { + var jar = new CookieJar(); + var url = 'http://example.com/index.html'; + jar.setCookieSync("a=b; Domain=example.com; Path=/", url); + jar.setCookieSync("c=d; Domain=example.com; Path=/", url); + return jar.getSetCookieStringsSync(url); + }, + "returns the cookie header string": function(err, headers) { + assert.ok(!err); + assert.ok(Array.isArray(headers)); + assert.lengthOf(headers, 2); + headers.forEach(function(header) { + assert.typeOf(header, 'string'); + }); + } + }, + } +}) +.addBatch({ + "Synchronous API on async CookieJar": { + topic: function() { + return new tough.Store(); + }, + "setCookieSync": { + topic: function(store) { + var jar = new CookieJar(store); + try { + jar.setCookieSync("a=b", 'http://example.com/index.html'); + return false; + } catch(e) { + return e; + } + }, + "fails": function(err) { + assert.instanceOf(err, Error); + assert.equal(err.message, + 'CookieJar store is not synchronous; use async API instead.'); + } + }, + "getCookiesSync": { + topic: function(store) { + var jar = new CookieJar(store); + try { + jar.getCookiesSync('http://example.com/index.html'); + return false; + } catch(e) { + return e; + } + }, + "fails": function(err) { + assert.instanceOf(err, Error); + assert.equal(err.message, + 'CookieJar store is not synchronous; use async API instead.'); + } + }, + "getCookieStringSync": { + topic: function(store) { + var jar = new CookieJar(store); + try { + jar.getCookieStringSync('http://example.com/index.html'); + return false; + } catch(e) { + return e; + } + }, + "fails": function(err) { + assert.instanceOf(err, Error); + assert.equal(err.message, + 'CookieJar store is not synchronous; use async API instead.'); + } + }, + "getSetCookieStringsSync": { + topic: function(store) { + var jar = new CookieJar(store); + try { + jar.getSetCookieStringsSync('http://example.com/index.html'); + return false; + } catch(e) { + return e; + } + }, + "fails": function(err) { + assert.instanceOf(err, Error); + assert.equal(err.message, + 'CookieJar store is not synchronous; use async API instead.'); + } + }, + } +}) .export(module); diff --git a/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc b/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc new file mode 100644 index 0000000000..4c1c8d4972 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/tunnel-agent/.jshintrc @@ -0,0 +1,5 @@ +{ + "node": true, + "asi": true, + "laxcomma": true +} diff --git a/deps/npm/node_modules/request/node_modules/tunnel-agent/index.js b/deps/npm/node_modules/request/node_modules/tunnel-agent/index.js index 3f7bbb909f..13c04272d3 100644 --- a/deps/npm/node_modules/request/node_modules/tunnel-agent/index.js +++ b/deps/npm/node_modules/request/node_modules/tunnel-agent/index.js @@ -67,9 +67,18 @@ function TunnelingAgent(options) { } util.inherits(TunnelingAgent, events.EventEmitter) -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port) { +TunnelingAgent.prototype.addRequest = function addRequest(req, options) { var self = this + // Legacy API: addRequest(req, host, port, path) + if (typeof options === 'string') { + options = { + host: options, + port: arguments[2], + path: arguments[3] + }; + } + if (self.sockets.length >= this.maxSockets) { // We are over limit so we'll add it to the queue. self.requests.push({host: host, port: port, request: req}) @@ -77,14 +86,14 @@ TunnelingAgent.prototype.addRequest = function addRequest(req, host, port) { } // If we are under maxSockets create a new one. - self.createSocket({host: host, port: port, request: req}, function(socket) { + self.createSocket({host: options.host, port: options.port, request: req}, function(socket) { socket.on('free', onFree) socket.on('close', onCloseOrRemove) socket.on('agentRemove', onCloseOrRemove) req.onSocket(socket) function onFree() { - self.emit('free', socket, host, port) + self.emit('free', socket, options.host, options.port) } function onCloseOrRemove(err) { diff --git a/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json b/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json index 3d7492aa8f..59c7f5cb50 100644 --- a/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json +++ b/deps/npm/node_modules/request/node_modules/tunnel-agent/package.json @@ -6,7 +6,7 @@ }, "name": "tunnel-agent", "description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.", - "version": "0.3.0", + "version": "0.4.0", "repository": { "url": "https://github.com/mikeal/tunnel-agent" }, @@ -17,12 +17,29 @@ "engines": { "node": "*" }, - "readme": "tunnel-agent\n============\n\nHTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.\n", - "readmeFilename": "README.md", "bugs": { "url": "https://github.com/mikeal/tunnel-agent/issues" }, "homepage": "https://github.com/mikeal/tunnel-agent", - "_id": "tunnel-agent@0.3.0", - "_from": "tunnel-agent@~0.3.0" + "_id": "tunnel-agent@0.4.0", + "dist": { + "shasum": "b1184e312ffbcf70b3b4c78e8c219de7ebb1c550", + "tarball": "http://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.0.tgz" + }, + "_from": "tunnel-agent@~0.4.0", + "_npmVersion": "1.3.21", + "_npmUser": { + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" + }, + "maintainers": [ + { + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" + } + ], + "directories": {}, + "_shasum": "b1184e312ffbcf70b3b4c78e8c219de7ebb1c550", + "_resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json index ca42f87d41..0e94d8d149 100755 --- a/deps/npm/node_modules/request/package.json +++ b/deps/npm/node_modules/request/package.json @@ -7,51 +7,75 @@ "util", "utility" ], - "version": "2.30.0", + "version": "2.42.0", "author": { "name": "Mikeal Rogers", "email": "mikeal.rogers@gmail.com" }, "repository": { "type": "git", - "url": "http://github.com/mikeal/request.git" + "url": "https://github.com/mikeal/request.git" }, "bugs": { "url": "http://github.com/mikeal/request/issues" }, + "license": "Apache-2.0", "engines": [ "node >= 0.8.0" ], "main": "index.js", "dependencies": { - "qs": "~0.6.0", - "json-stringify-safe": "~5.0.0", + "bl": "~0.9.0", + "caseless": "~0.6.0", "forever-agent": "~0.5.0", + "qs": "~1.2.0", + "json-stringify-safe": "~5.0.0", + "mime-types": "~1.0.1", "node-uuid": "~1.4.0", - "mime": "~1.2.9", - "tough-cookie": "~0.9.15", + "tunnel-agent": "~0.4.0", + "tough-cookie": ">=0.12.0", "form-data": "~0.1.0", - "tunnel-agent": "~0.3.0", "http-signature": "~0.10.0", - "oauth-sign": "~0.3.0", - "hawk": "~1.0.0", - "aws-sign2": "~0.5.0" + "oauth-sign": "~0.4.0", + "hawk": "1.1.1", + "aws-sign2": "~0.5.0", + "stringstream": "~0.0.4" }, "optionalDependencies": { - "tough-cookie": "~0.9.15", + "tough-cookie": ">=0.12.0", "form-data": "~0.1.0", - "tunnel-agent": "~0.3.0", "http-signature": "~0.10.0", - "oauth-sign": "~0.3.0", - "hawk": "~1.0.0", - "aws-sign2": "~0.5.0" + "oauth-sign": "~0.4.0", + "hawk": "1.1.1", + "aws-sign2": "~0.5.0", + "stringstream": "~0.0.4" }, "scripts": { "test": "node tests/run.js" }, - "readme": "# Request -- Simplified HTTP client\n\n[![NPM](https://nodei.co/npm/request.png)](https://nodei.co/npm/request/)\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let’s get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nURL-encoded forms are simple.\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don’t need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to `true`, which 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).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n var access_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: access_token.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1/users/show.json?'\n , params =\n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n### Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```\nvar request = require('request');\n\nvar options = {\n\turl: 'https://api.github.com/repos/mikeal/request',\n\theaders: {\n\t\t'User-Agent': 'request'\n\t}\n};\n\nfunction callback(error, response, body) {\n\tif (!error && response.statusCode == 200) {\n\t\tvar info = JSON.parse(body);\n\t\tconsole.log(info.stargazers_count + \" Stars\");\n\t\tconsole.log(info.forks_count + \" Forks\");\n\t}\n}\n\nrequest(options, callback);\n```\n\n### request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n* `qs` - object containing querystring values to be appended to the `uri`\n* `method` - http method (default: `\"GET\"`)\n* `headers` - http headers (default: `{}`)\n* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.\n* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`)\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n* `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.\n* `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`)\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\n* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n* `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments: \n\n1. An `error` when applicable (usually from the `http.Client` option, not the `http.ClientRequest` object)\n2. An `http.ClientResponse` object\n3. The third is the `response` body (`String` or `Buffer`)\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options)\n\nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.add(cookie)\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n", - "readmeFilename": "README.md", + "devDependencies": { + "rimraf": "~2.2.8" + }, "homepage": "https://github.com/mikeal/request", - "_id": "request@2.30.0", - "_from": "request@latest" + "_id": "request@2.42.0", + "_shasum": "572bd0148938564040ac7ab148b96423a063304a", + "_from": "request@^2.42.0", + "_npmVersion": "1.4.9", + "_npmUser": { + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" + }, + "maintainers": [ + { + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" + } + ], + "dist": { + "shasum": "572bd0148938564040ac7ab148b96423a063304a", + "tarball": "http://registry.npmjs.org/request/-/request-2.42.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/request/-/request-2.42.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/request/request.js b/deps/npm/node_modules/request/request.js index 3c03c47dab..e528dd5ff4 100644 --- a/deps/npm/node_modules/request/request.js +++ b/deps/npm/node_modules/request/request.js @@ -8,26 +8,29 @@ var optional = require('./lib/optional') , qs = require('qs') , querystring = require('querystring') , crypto = require('crypto') + , zlib = require('zlib') + , bl = require('bl') , oauth = optional('oauth-sign') , hawk = optional('hawk') - , aws = optional('aws-sign') + , aws = optional('aws-sign2') , httpSignature = optional('http-signature') , uuid = require('node-uuid') - , mime = require('mime') - , tunnel = optional('tunnel-agent') + , mime = require('mime-types') + , tunnel = require('tunnel-agent') , _safeStringify = require('json-stringify-safe') + , stringstream = optional('stringstream') + , caseless = require('caseless') , ForeverAgent = require('forever-agent') , FormData = optional('form-data') - , Cookie = optional('tough-cookie') - , CookieJar = Cookie && Cookie.CookieJar - , cookieJar = CookieJar && new CookieJar + , cookies = require('./lib/cookies') + , globalCookieJar = cookies.jar() , copy = require('./lib/copy') , debug = require('./lib/debug') - , getSafe = require('./lib/getSafe') + , net = require('net') ; function safeStringify (obj) { @@ -38,28 +41,37 @@ function safeStringify (obj) { } var globalPool = {} -var isUrl = /^https?:/i - - -// Hacky fix for pre-0.4.4 https -if (https && !https.Agent) { - https.Agent = function (options) { - http.Agent.call(this, options) - } - util.inherits(https.Agent, http.Agent) - https.Agent.prototype._getConnection = function (host, port, cb) { - var s = tls.connect(port, host, this.options, function () { - // do other checks here? - if (cb) cb() - }) - return s - } -} +var isUrl = /^https?:|^unix:/ + +var defaultProxyHeaderWhiteList = [ + 'accept', + 'accept-charset', + 'accept-encoding', + 'accept-language', + 'accept-ranges', + 'cache-control', + 'content-encoding', + 'content-language', + 'content-length', + 'content-location', + 'content-md5', + 'content-range', + 'content-type', + 'connection', + 'date', + 'expect', + 'max-forwards', + 'pragma', + 'proxy-authorization', + 'referer', + 'te', + 'transfer-encoding', + 'user-agent', + 'via' +] function isReadStream (rs) { - if (rs.readable && rs.path && rs.mode) { - return true - } + return rs.readable && rs.path && rs.mode; } function toBase64 (str) { @@ -70,6 +82,25 @@ function md5 (str) { return crypto.createHash('md5').update(str).digest('hex') } +// Return a simpler request object to allow serialization +function requestToJSON() { + return { + uri: this.uri, + method: this.method, + headers: this.headers + } +} + +// Return a simpler response object to allow serialization +function responseToJSON() { + return { + statusCode: this.statusCode, + body: this.body, + headers: this.headers, + request: requestToJSON.call(this.request) + } +} + function Request (options) { stream.Stream.call(this) this.readable = true @@ -94,11 +125,85 @@ function Request (options) { this.explicitMethod = true } - this.canTunnel = options.tunnel !== false && tunnel; + // Assume that we're not going to tunnel unless we need to + if (typeof options.tunnel === 'undefined') options.tunnel = false this.init(options) } util.inherits(Request, stream.Stream) + + +// Set up the tunneling agent if necessary +Request.prototype.setupTunnel = function () { + var self = this + if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy) + + if (!self.proxy) return false + + // Don't need to use a tunneling proxy + if (!self.tunnel && self.uri.protocol !== 'https:') + return + + // do the HTTP CONNECT dance using koichik/node-tunnel + + // The host to tell the proxy to CONNECT to + var proxyHost = self.uri.hostname + ':' + if (self.uri.port) + proxyHost += self.uri.port + else if (self.uri.protocol === 'https:') + proxyHost += '443' + else + proxyHost += '80' + + if (!self.proxyHeaderWhiteList) + self.proxyHeaderWhiteList = defaultProxyHeaderWhiteList + + // Only send the proxy the whitelisted header names. + var proxyHeaders = Object.keys(self.headers).filter(function (h) { + return self.proxyHeaderWhiteList.indexOf(h.toLowerCase()) !== -1 + }).reduce(function (set, h) { + set[h] = self.headers[h] + return set + }, {}) + + proxyHeaders.host = proxyHost + + var tunnelFnName = + (self.uri.protocol === 'https:' ? 'https' : 'http') + + 'Over' + + (self.proxy.protocol === 'https:' ? 'Https' : 'Http') + + var tunnelFn = tunnel[tunnelFnName] + + var proxyAuth + if (self.proxy.auth) + proxyAuth = self.proxy.auth + else if (self.proxyAuthorization) + proxyHeaders['Proxy-Authorization'] = self.proxyAuthorization + + var tunnelOptions = { proxy: { host: self.proxy.hostname + , port: +self.proxy.port + , proxyAuth: proxyAuth + , headers: proxyHeaders } + , rejectUnauthorized: self.rejectUnauthorized + , headers: self.headers + , ca: self.ca + , cert: self.cert + , key: self.key} + + self.agent = tunnelFn(tunnelOptions) + + // At this point, we know that the proxy will support tunneling + // (or fail miserably), so we're going to tunnel all proxied requests + // from here on out. + self.tunnel = true + + return true +} + + + + Request.prototype.init = function (options) { // init() contains all the code to setup the request object. // the actual outgoing request is not started until start() is called @@ -106,6 +211,14 @@ Request.prototype.init = function (options) { var self = this if (!options) options = {} + caseless.httpify(self, self.headers || {}) + + // Never send proxy-auth to the endpoint! + if (self.hasHeader('proxy-authorization')) { + self.proxyAuthorization = self.getHeader('proxy-authorization') + self.removeHeader('proxy-authorization') + } + if (!self.method) self.method = options.method || 'GET' self.localAddress = options.localAddress @@ -143,30 +256,25 @@ Request.prototype.init = function (options) { self.rejectUnauthorized = false } - if (self.proxy) { - if (typeof self.proxy == 'string') self.proxy = url.parse(self.proxy) - - // do the HTTP CONNECT dance using koichik/node-tunnel - if (http.globalAgent && self.uri.protocol === "https:" && self.canTunnel) { - var tunnelFn = self.proxy.protocol === "http:" - ? tunnel.httpsOverHttp : tunnel.httpsOverHttps - - var tunnelOptions = { proxy: { host: self.proxy.hostname - , port: +self.proxy.port - , proxyAuth: self.proxy.auth - , headers: { Host: self.uri.hostname + ':' + - (self.uri.port || self.uri.protocol === 'https:' ? 443 : 80) }} - , rejectUnauthorized: self.rejectUnauthorized - , ca: this.ca } - - self.agent = tunnelFn(tunnelOptions) - self.tunnel = true + if(!self.hasOwnProperty('proxy')) { + // check for HTTP(S)_PROXY environment variables + if(self.uri.protocol == "http:") { + self.proxy = process.env.HTTP_PROXY || process.env.http_proxy || null; + } else if(self.uri.protocol == "https:") { + self.proxy = process.env.HTTPS_PROXY || process.env.https_proxy || + process.env.HTTP_PROXY || process.env.http_proxy || null; } } + // Pass in `tunnel:true` to *always* tunnel through proxies + self.tunnel = !!options.tunnel + if (self.proxy) { + self.setupTunnel() + } + if (!self.uri.pathname) {self.uri.pathname = '/'} - if (!self.uri.host) { + if (!self.uri.host && !self.protocol=='unix:') { // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar // Detect and reject it as soon as possible var faultyUri = url.format(self.uri) @@ -183,13 +291,14 @@ Request.prototype.init = function (options) { self._redirectsFollowed = self._redirectsFollowed || 0 self.maxRedirects = (self.maxRedirects !== undefined) ? self.maxRedirects : 10 - self.followRedirect = (self.followRedirect !== undefined) ? self.followRedirect : true + self.allowRedirect = (typeof self.followRedirect === 'function') ? self.followRedirect : function(response) { + return true; + }; + self.followRedirect = (self.followRedirect !== undefined) ? !!self.followRedirect : true self.followAllRedirects = (self.followAllRedirects !== undefined) ? self.followAllRedirects : false if (self.followRedirect || self.followAllRedirects) self.redirects = self.redirects || [] - self.headers = self.headers ? copy(self.headers) : {} - self.setHost = false if (!self.hasHeader('host')) { self.setHeader('host', self.uri.hostname) @@ -244,176 +353,290 @@ Request.prototype.init = function (options) { } } - if (options.form) { - self.form(options.form) - } + self._buildRequest = function(){ + var self = this; - if (options.qs) self.qs(options.qs) + if (options.form) { + self.form(options.form) + } - if (self.uri.path) { - self.path = self.uri.path - } else { - self.path = self.uri.pathname + (self.uri.search || "") - } + if (options.qs) self.qs(options.qs) - if (self.path.length === 0) self.path = '/' + if (self.uri.path) { + self.path = self.uri.path + } else { + self.path = self.uri.pathname + (self.uri.search || "") + } + if (self.path.length === 0) self.path = '/' - // Auth must happen last in case signing is dependent on other headers - if (options.oauth) { - self.oauth(options.oauth) - } - if (options.aws) { - self.aws(options.aws) - } + // Auth must happen last in case signing is dependent on other headers + if (options.oauth) { + self.oauth(options.oauth) + } - if (options.hawk) { - self.hawk(options.hawk) - } + if (options.aws) { + self.aws(options.aws) + } - if (options.httpSignature) { - self.httpSignature(options.httpSignature) - } + if (options.hawk) { + self.hawk(options.hawk) + } - if (options.auth) { - if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) options.auth.user = options.auth.username - if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) options.auth.pass = options.auth.password - - self.auth( - options.auth.user, - options.auth.pass, - options.auth.sendImmediately - ) - } + if (options.httpSignature) { + self.httpSignature(options.httpSignature) + } - if (self.uri.auth && !self.hasHeader('authorization')) { - var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) }) - self.auth(authPieces[0], authPieces.slice(1).join(':'), true) - } - if (self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization') && !self.tunnel) { - self.setHeader('proxy-authorization', "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':'))) - } + if (options.auth) { + if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) options.auth.user = options.auth.username + if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) options.auth.pass = options.auth.password + self.auth( + options.auth.user, + options.auth.pass, + options.auth.sendImmediately, + options.auth.bearer + ) + } - if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path) + if (self.gzip && !self.hasHeader('accept-encoding')) { + self.setHeader('accept-encoding', 'gzip') + } - if (options.json) { - self.json(options.json) - } else if (options.multipart) { - self.boundary = uuid() - self.multipart(options.multipart) - } + if (self.uri.auth && !self.hasHeader('authorization')) { + var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) }) + self.auth(authPieces[0], authPieces.slice(1).join(':'), true) + } - if (self.body) { - var length = 0 - if (!Buffer.isBuffer(self.body)) { - if (Array.isArray(self.body)) { - for (var i = 0; i < self.body.length; i++) { - length += self.body[i].length + if (self.proxy && !self.tunnel) { + if (self.proxy.auth && !self.proxyAuthorization) { + var authPieces = self.proxy.auth.split(':').map(function(item){ + return querystring.unescape(item) + }) + var authHeader = 'Basic ' + toBase64(authPieces.join(':')) + self.proxyAuthorization = authHeader + } + if (self.proxyAuthorization) + self.setHeader('proxy-authorization', self.proxyAuthorization) + } + + if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path) + + if (options.json) { + self.json(options.json) + } else if (options.multipart) { + self.boundary = uuid() + self.multipart(options.multipart) + } + + if (self.body) { + var length = 0 + if (!Buffer.isBuffer(self.body)) { + if (Array.isArray(self.body)) { + for (var i = 0; i < self.body.length; i++) { + length += self.body[i].length + } + } else { + self.body = new Buffer(self.body) + length = self.body.length } } else { - self.body = new Buffer(self.body) length = self.body.length } - } else { - length = self.body.length - } - if (length) { - if (!self.hasHeader('content-length')) self.setHeader('content-length', length) - } else { - throw new Error('Argument error, options.body.') + if (length) { + if (!self.hasHeader('content-length')) self.setHeader('content-length', length) + } else { + throw new Error('Argument error, options.body.') + } } - } - var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol - , defaultModules = {'http:':http, 'https:':https} - , httpModules = self.httpModules || {} - ; - self.httpModule = httpModules[protocol] || defaultModules[protocol] + var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol + , defaultModules = {'http:':http, 'https:':https, 'unix:':http} + , httpModules = self.httpModules || {} + ; + self.httpModule = httpModules[protocol] || defaultModules[protocol] - if (!self.httpModule) return this.emit('error', new Error("Invalid protocol")) + if (!self.httpModule) return this.emit('error', new Error("Invalid protocol: " + protocol)) - if (options.ca) self.ca = options.ca + if (options.ca) self.ca = options.ca - if (!self.agent) { - if (options.agentOptions) self.agentOptions = options.agentOptions + if (!self.agent) { + if (options.agentOptions) self.agentOptions = options.agentOptions - if (options.agentClass) { - self.agentClass = options.agentClass - } else if (options.forever) { - self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL - } else { - self.agentClass = self.httpModule.Agent + if (options.agentClass) { + self.agentClass = options.agentClass + } else if (options.forever) { + self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL + } else { + self.agentClass = self.httpModule.Agent + } } - } - if (self.pool === false) { - self.agent = false - } else { - self.agent = self.agent || self.getAgent() - if (self.maxSockets) { - // Don't use our pooling if node has the refactored client - self.agent.maxSockets = self.maxSockets - } - if (self.pool.maxSockets) { - // Don't use our pooling if node has the refactored client - self.agent.maxSockets = self.pool.maxSockets + if (self.pool === false) { + self.agent = false + } else { + self.agent = self.agent || self.getAgent() + if (self.maxSockets) { + // Don't use our pooling if node has the refactored client + self.agent.maxSockets = self.maxSockets + } + if (self.pool.maxSockets) { + // Don't use our pooling if node has the refactored client + self.agent.maxSockets = self.pool.maxSockets + } } - } - self.on('pipe', function (src) { - if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") - self.src = src - if (isReadStream(src)) { - if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path)) - } else { - if (src.headers) { - for (var i in src.headers) { - if (!self.hasHeader(i)) { - self.setHeader(i, src.headers[i]) + self.on('pipe', function (src) { + if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") + self.src = src + if (isReadStream(src)) { + if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path)) + } else { + if (src.headers) { + for (var i in src.headers) { + if (!self.hasHeader(i)) { + self.setHeader(i, src.headers[i]) + } } } + if (self._json && !self.hasHeader('content-type')) + self.setHeader('content-type', 'application/json') + if (src.method && !self.explicitMethod) { + self.method = src.method + } } - if (self._json && !self.hasHeader('content-type')) - self.setHeader('content-type', 'application/json') - if (src.method && !self.explicitMethod) { - self.method = src.method - } - } - // self.on('pipe', function () { - // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") - // }) - }) + // self.on('pipe', function () { + // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") + // }) + }) - process.nextTick(function () { - if (self._aborted) return + process.nextTick(function () { + if (self._aborted) return - if (self._form) { - self.setHeaders(self._form.getHeaders()) - self._form.pipe(self) - } - if (self.body) { - if (Array.isArray(self.body)) { - self.body.forEach(function (part) { - self.write(part) + var end = function () { + if (self._form) { + self._form.pipe(self) + } + if (self.body) { + if (Array.isArray(self.body)) { + self.body.forEach(function (part) { + self.write(part) + }) + } else { + self.write(self.body) + } + self.end() + } else if (self.requestBodyStream) { + console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.") + self.requestBodyStream.pipe(self) + } else if (!self.src) { + if (self.method !== 'GET' && typeof self.method !== 'undefined') { + self.setHeader('content-length', 0) + } + self.end() + } + } + + if (self._form && !self.hasHeader('content-length')) { + // Before ending the request, we had to compute the length of the whole form, asyncly + self.setHeader(self._form.getHeaders()) + self._form.getLength(function (err, length) { + if (!err) { + self.setHeader('content-length', length) + } + end() }) } else { - self.write(self.body) + end() + } + + self.ntick = true + }) + + } // End _buildRequest + + self._handleUnixSocketURI = function(self){ + // Parse URI and extract a socket path (tested as a valid socket using net.connect), and a http style path suffix + // Thus http requests can be made to a socket using the uri unix://tmp/my.socket/urlpath + // and a request for '/urlpath' will be sent to the unix socket at /tmp/my.socket + + self.unixsocket = true; + + var full_path = self.uri.href.replace(self.uri.protocol+'/', ''); + + var lookup = full_path.split('/'); + var error_connecting = true; + + var lookup_table = {}; + do { lookup_table[lookup.join('/')]={} } while(lookup.pop()) + for (r in lookup_table){ + try_next(r); + } + + function try_next(table_row){ + var client = net.connect( table_row ); + client.path = table_row + client.on('error', function(){ lookup_table[this.path].error_connecting=true; this.end(); }); + client.on('connect', function(){ lookup_table[this.path].error_connecting=false; this.end(); }); + table_row.client = client; + } + + wait_for_socket_response(); + + response_counter = 0; + + function wait_for_socket_response(){ + var detach; + if('undefined' == typeof setImmediate ) detach = process.nextTick + else detach = setImmediate; + detach(function(){ + // counter to prevent infinite blocking waiting for an open socket to be found. + response_counter++; + var trying = false; + for (r in lookup_table){ + if('undefined' == typeof lookup_table[r].error_connecting) + trying = true; + } + if(trying && response_counter<1000) + wait_for_socket_response() + else + set_socket_properties(); + }) + } + + function set_socket_properties(){ + var host; + for (r in lookup_table){ + if(lookup_table[r].error_connecting === false){ + host = r + } } - self.end() - } else if (self.requestBodyStream) { - console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.") - self.requestBodyStream.pipe(self) - } else if (!self.src) { - if (self.method !== 'GET' && typeof self.method !== 'undefined') { - self.setHeader('content-length', 0) + if(!host){ + self.emit('error', new Error("Failed to connect to any socket in "+full_path)) } - self.end() + var path = full_path.replace(host, '') + + self.socketPath = host + self.uri.pathname = path + self.uri.href = path + self.uri.path = path + self.host = '' + self.hostname = '' + delete self.host + delete self.hostname + self._buildRequest(); } - self.ntick = true - }) + } + + // Intercept UNIX protocol requests to change properties to match socket + if(/^unix:/.test(self.uri.protocol)){ + self._handleUnixSocketURI(self); + } else { + self._buildRequest(); + } + } // Must call this when following a redirect from https to http or vice versa @@ -423,20 +646,11 @@ Request.prototype._updateProtocol = function () { var self = this var protocol = self.uri.protocol - if (protocol === 'https:') { + if (protocol === 'https:' || self.tunnel) { // previously was doing http, now doing https // if it's https, then we might need to tunnel now. - if (self.proxy && self.canTunnel) { - self.tunnel = true - var tunnelFn = self.proxy.protocol === 'http:' - ? tunnel.httpsOverHttp : tunnel.httpsOverHttps - var tunnelOptions = { proxy: { host: self.proxy.hostname - , port: +self.proxy.port - , proxyAuth: self.proxy.auth } - , rejectUnauthorized: self.rejectUnauthorized - , ca: self.ca } - self.agent = tunnelFn(tunnelOptions) - return + if (self.proxy) { + if (self.setupTunnel()) return } self.httpModule = https @@ -457,8 +671,6 @@ Request.prototype._updateProtocol = function () { } else { // previously was doing https, now doing http - // stop any tunneling. - if (self.tunnel) self.tunnel = false self.httpModule = http switch (self.agentClass) { case ForeverAgent.SSL: @@ -491,6 +703,7 @@ Request.prototype.getAgent = function () { if (this.ca) options.ca = this.ca if (this.ciphers) options.ciphers = this.ciphers if (this.secureProtocol) options.secureProtocol = this.secureProtocol + if (this.secureOptions) options.secureOptions = this.secureOptions if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized if (this.cert && this.key) { @@ -540,6 +753,11 @@ Request.prototype.getAgent = function () { if (poolKey) poolKey += ':' poolKey += options.secureProtocol } + + if (options.secureOptions) { + if (poolKey) poolKey += ':' + poolKey += options.secureOptions + } } if (this.pool === globalPool && !poolKey && Object.keys(options).length === 0 && this.httpModule.globalAgent) { @@ -620,7 +838,9 @@ Request.prototype.onResponse = function (response) { debug('response end', self.uri.href, response.statusCode, response.headers) }); - if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) { + // The check on response.connection is a workaround for browserify. + if (response.connection && response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) { + response.connection.setMaxListeners(0) response.connection.once('error', self._parserErrorHandler) } if (self._aborted) { @@ -629,51 +849,50 @@ Request.prototype.onResponse = function (response) { return } if (self._paused) response.pause() - else response.resume() + // Check that response.resume is defined. Workaround for browserify. + else response.resume && response.resume() self.response = response response.request = self - response.toJSON = toJSON + response.toJSON = responseToJSON // XXX This is different on 0.10, because SSL is strict by default if (self.httpModule === https && - self.strictSSL && - !response.client.authorized) { + self.strictSSL && (!response.hasOwnProperty('client') || + !response.client.authorized)) { debug('strict ssl error', self.uri.href) - var sslErr = response.client.authorizationError + var sslErr = response.hasOwnProperty('client') ? response.client.authorizationError : self.uri.href + " does not support SSL"; self.emit('error', new Error('SSL Error: '+ sslErr)) return } - if (self.setHost && self.hasHeader('host')) delete self.headers[self.hasHeader('host')] + if (self.setHost) self.removeHeader('host') if (self.timeout && self.timeoutTimer) { clearTimeout(self.timeoutTimer) self.timeoutTimer = null } + var targetCookieJar = (self._jar && self._jar.setCookie)?self._jar:globalCookieJar; var addCookie = function (cookie) { - if (self._jar){ - var targetCookieJar = self._jar.setCookie?self._jar:cookieJar; - - //set the cookie if it's domain in the href's domain. - targetCookieJar.setCookie(cookie, self.uri.href, function(err){ - if (err){ - console.warn('set cookie failed,'+ err) - } - }) + //set the cookie if it's domain in the href's domain. + try { + targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true}); + } catch (e) { + self.emit('error', e); } - } - if (hasHeader('set-cookie', response.headers) && (!self._disableCookies)) { - var headerName = hasHeader('set-cookie', response.headers) + response.caseless = caseless(response.headers) + + if (response.caseless.has('set-cookie') && (!self._disableCookies)) { + var headerName = response.caseless.has('set-cookie') if (Array.isArray(response.headers[headerName])) response.headers[headerName].forEach(addCookie) else addCookie(response.headers[headerName]) } var redirectTo = null - if (response.statusCode >= 300 && response.statusCode < 400 && hasHeader('location', response.headers)) { - var location = response.headers[hasHeader('location', response.headers)] + if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) { + var location = response.caseless.get('location') debug('redirect', location) if (self.followAllRedirects) { @@ -692,17 +911,22 @@ Request.prototype.onResponse = function (response) { } } } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) { - var authHeader = response.headers[hasHeader('www-authenticate', response.headers)] - var authVerb = authHeader && authHeader.split(' ')[0] + var authHeader = response.caseless.get('www-authenticate') + var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase() debug('reauth', authVerb) switch (authVerb) { - case 'Basic': + case 'basic': self.auth(self._user, self._pass, true) redirectTo = self.uri break - case 'Digest': + case 'bearer': + self.auth(null, null, true, self._bearer) + redirectTo = self.uri + break + + case 'digest': // TODO: More complete implementation of RFC 2617. // - check challenge.algorithm // - support algorithm="MD5-sess" @@ -761,7 +985,7 @@ Request.prototype.onResponse = function (response) { } } - if (redirectTo) { + if (redirectTo && self.allowRedirect.call(self, response)) { debug('redirect to', redirectTo) // ignore any potential response body. it cannot possibly be useful @@ -791,21 +1015,21 @@ Request.prototype.onResponse = function (response) { , redirectUri: redirectTo } ) - if (self.followAllRedirects && response.statusCode != 401) self.method = 'GET' + if (self.followAllRedirects && response.statusCode != 401 && response.statusCode != 307) self.method = 'GET' // self.method = 'GET' // Force all redirects to use GET || commented out fixes #215 delete self.src delete self.req delete self.agent delete self._started - if (response.statusCode != 401) { + if (response.statusCode != 401 && response.statusCode != 307) { // Remove parameters from the previous response, unless this is the second request // for a server that requires digest authentication. delete self.body delete self._form if (self.headers) { - if (self.hasHeader('host')) delete self.headers[self.hasHeader('host')] - if (self.hasHeader('content-type')) delete self.headers[self.hasHeader('content-type')] - if (self.hasHeader('content-length')) delete self.headers[self.hasHeader('content-length')] + self.removeHeader('host') + self.removeHeader('content-type') + self.removeHeader('content-length') } } @@ -821,11 +1045,40 @@ Request.prototype.onResponse = function (response) { if (!self._ended) self.response.emit('end') }) + response.on('end', function () { + self._ended = true + }) + + var dataStream + if (self.gzip) { + var contentEncoding = response.headers["content-encoding"] || "identity" + contentEncoding = contentEncoding.trim().toLowerCase() + + if (contentEncoding === "gzip") { + dataStream = zlib.createGunzip() + response.pipe(dataStream) + } else { + // Since previous versions didn't check for Content-Encoding header, + // ignore any invalid values to preserve backwards-compatibility + if (contentEncoding !== "identity") { + debug("ignoring unrecognized Content-Encoding " + contentEncoding) + } + dataStream = response + } + } else { + dataStream = response + } + if (self.encoding) { if (self.dests.length !== 0) { console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.") + } else if (dataStream.setEncoding) { + dataStream.setEncoding(self.encoding) } else { - response.setEncoding(self.encoding) + // Should only occur on node pre-v0.9.4 (joyent/node@9b5abe5) with + // zlib streams. + // If/When support for 0.9.4 is dropped, this should be unnecessary. + dataStream = dataStream.pipe(stringstream(self.encoding)) } } @@ -835,22 +1088,22 @@ Request.prototype.onResponse = function (response) { self.pipeDest(dest) }) - response.on("data", function (chunk) { + dataStream.on("data", function (chunk) { self._destdata = true self.emit("data", chunk) }) - response.on("end", function (chunk) { - self._ended = true + dataStream.on("end", function (chunk) { self.emit("end", chunk) }) - response.on("close", function () {self.emit("close")}) + dataStream.on("close", function () {self.emit("close")}) if (self.callback) { - var buffer = [] - var bodyLen = 0 + var buffer = bl() + , strings = [] + ; self.on("data", function (chunk) { - buffer.push(chunk) - bodyLen += chunk.length + if (Buffer.isBuffer(chunk)) buffer.append(chunk) + else strings.push(chunk) }) self.on("end", function () { debug('end event', self.uri.href) @@ -859,26 +1112,22 @@ Request.prototype.onResponse = function (response) { return } - if (buffer.length && Buffer.isBuffer(buffer[0])) { - debug('has body', self.uri.href, bodyLen) - var body = new Buffer(bodyLen) - var i = 0 - buffer.forEach(function (chunk) { - chunk.copy(body, i, 0, chunk.length) - i += chunk.length - }) + if (buffer.length) { + debug('has body', self.uri.href, buffer.length) if (self.encoding === null) { - response.body = body + // response.body = buffer + // can't move to this until https://github.com/rvagg/bl/issues/13 + response.body = buffer.slice() } else { - response.body = body.toString(self.encoding) + response.body = buffer.toString(self.encoding) } - } else if (buffer.length) { + } else if (strings.length) { // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). - if (self.encoding === 'utf8' && buffer[0].length > 0 && buffer[0][0] === "\uFEFF") { - buffer[0] = buffer[0].substring(1) + if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === "\uFEFF") { + strings[0] = strings[0].substring(1) } - response.body = buffer.join('') + response.body = strings.join('') } if (self._json) { @@ -924,51 +1173,31 @@ Request.prototype.pipeDest = function (dest) { var response = this.response // Called after the response is received if (dest.headers && !dest.headersSent) { - if (hasHeader('content-type', response.headers)) { - var ctname = hasHeader('content-type', response.headers) + if (response.caseless.has('content-type')) { + var ctname = response.caseless.has('content-type') if (dest.setHeader) dest.setHeader(ctname, response.headers[ctname]) else dest.headers[ctname] = response.headers[ctname] } - if (hasHeader('content-length', response.headers)) { - var clname = hasHeader('content-length', response.headers) + if (response.caseless.has('content-length')) { + var clname = response.caseless.has('content-length') if (dest.setHeader) dest.setHeader(clname, response.headers[clname]) else dest.headers[clname] = response.headers[clname] } } if (dest.setHeader && !dest.headersSent) { for (var i in response.headers) { - dest.setHeader(i, response.headers[i]) + // If the response content is being decoded, the Content-Encoding header + // of the response doesn't represent the piped content, so don't pass it. + if (!this.gzip || i !== 'content-encoding') { + dest.setHeader(i, response.headers[i]) + } } dest.statusCode = response.statusCode } if (this.pipefilter) this.pipefilter(response, dest) } -// Composable API -Request.prototype.setHeader = function (name, value, clobber) { - if (clobber === undefined) clobber = true - if (clobber || !this.hasHeader(name)) this.headers[name] = value - else this.headers[this.hasHeader(name)] += ',' + value - return this -} -Request.prototype.setHeaders = function (headers) { - for (var i in headers) {this.setHeader(i, headers[i])} - return this -} -Request.prototype.hasHeader = function (header, headers) { - var headers = Object.keys(headers || this.headers) - , lheaders = headers.map(function (h) {return h.toLowerCase()}) - ; - header = header.toLowerCase() - for (var i=0;i return cb(null, x)\n- throw er ==> return cb(er)\n\n```javascript\n// return true if a path is either\n// a symlink or a directory.\nfunction isLinkOrDir (path, cb) {\n fs.lstat(path, function (er, s) {\n if (er) return cb(er)\n return cb(null, s.isDirectory() || s.isSymbolicLink())\n })\n}\n```\n\n# asyncMap\n\n## Usecases\n\n- I have a list of 10 files, and need to read all of them, and then continue when they're all done.\n- I have a dozen URLs, and need to fetch them all, and then continue when they're all done.\n- I have 4 connected users, and need to send a message to all of them, and then continue when that's done.\n- I have a list of n things, and I need to dosomething with all of them, in parallel, and get the results once they're all complete.\n\n\n## Solution\n\n```javascript\nvar asyncMap = require(\"slide\").asyncMap\nfunction writeFiles (files, what, cb) {\n asyncMap(files, function (f, cb) {\n fs.writeFile(f, what, cb)\n }, cb)\n}\nwriteFiles([my, file, list], \"foo\", cb)\n```\n\n# chain\n\n## Usecases\n\n- I have to do a bunch of things, in order. Get db credentials out of a file,\n read the data from the db, write that data to another file.\n- If anything fails, do not continue.\n- I still have to provide an array of functions, which is a lot of boilerplate,\n and a pita if your functions take args like\n\n```javascript\nfunction (cb) {\n blah(a, b, c, cb)\n}\n```\n\n- Results are discarded, which is a bit lame.\n- No way to branch.\n\n## Solution\n\n- reduces boilerplate by converting an array of [fn, args] to an actor\n that takes no arguments (except cb)\n- A bit like Function#bind, but tailored for our use-case.\n- bindActor(obj, \"method\", a, b, c)\n- bindActor(fn, a, b, c)\n- bindActor(obj, fn, a, b, c)\n- branching, skipping over falsey arguments\n\n```javascript\nchain([\n doThing && [thing, a, b, c]\n, isFoo && [doFoo, \"foo\"]\n, subChain && [chain, [one, two]]\n], cb)\n```\n\n- tracking results: results are stored in an optional array passed as argument,\n last result is always in results[results.length - 1].\n- treat chain.first and chain.last as placeholders for the first/last\n result up until that point.\n\n\n## Non-trivial example\n\n- Read number files in a directory\n- Add the results together\n- Ping a web service with the result\n- Write the response to a file\n- Delete the number files\n\n```javascript\nvar chain = require(\"slide\").chain\nfunction myProgram (cb) {\n var res = [], last = chain.last, first = chain.first\n chain([\n [fs, \"readdir\", \"the-directory\"]\n , [readFiles, \"the-directory\", last]\n , [sum, last]\n , [ping, \"POST\", \"example.com\", 80, \"/foo\", last]\n , [fs, \"writeFile\", \"result.txt\", last]\n , [rmFiles, \"./the-directory\", first]\n ], res, cb)\n}\n```\n\n# Conclusion: Convention Profits\n\n- Consistent API from top to bottom.\n- Sneak in at any point to inject functionality. Testable, reusable, ...\n- When ruby and python users whine, you can smile condescendingly.\n", - "readmeFilename": "README.md", + "gitHead": "8345e51ee41e35825abc1a40750ea11462f57028", "bugs": { "url": "https://github.com/isaacs/slide-flow-control/issues" }, - "_id": "slide@1.1.5", - "_from": "slide@latest" + "homepage": "https://github.com/isaacs/slide-flow-control", + "_id": "slide@1.1.6", + "scripts": {}, + "_shasum": "56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707", + "_from": "slide@~1.1.6", + "_npmVersion": "2.0.0-beta.3", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707", + "tarball": "http://registry.npmjs.org/slide/-/slide-1.1.6.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "readme": "ERROR: No README data found!" } diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json index 89ac65cf53..4f66030350 100644 --- a/deps/npm/node_modules/tar/package.json +++ b/deps/npm/node_modules/tar/package.json @@ -6,7 +6,7 @@ }, "name": "tar", "description": "tar for node", - "version": "1.0.0", + "version": "1.0.1", "repository": { "type": "git", "url": "git://github.com/isaacs/node-tar.git" @@ -17,22 +17,23 @@ }, "dependencies": { "block-stream": "*", - "fstream": "^1.0.0", + "fstream": "^1.0.2", "inherits": "2" }, "devDependencies": { - "tap": "0.x", - "rimraf": "1.x" + "graceful-fs": "^3.0.2", + "rimraf": "1.x", + "tap": "0.x" }, "license": "BSD", "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThis only works with directories, it does not work with individual files.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n", "readmeFilename": "README.md", - "gitHead": "49979621a55c73c3f668d8e01830eba1ea9df862", + "gitHead": "476bf6f5882b9c33d1cbf66f175d0f25e3981044", "bugs": { "url": "https://github.com/isaacs/node-tar/issues" }, "homepage": "https://github.com/isaacs/node-tar", - "_id": "tar@1.0.0", - "_shasum": "36636d76e8ae12b4bc11a940ac606b5ca8a5fe1f", + "_id": "tar@1.0.1", + "_shasum": "6075b5a1f236defe0c7e3756d3d9b3ebdad0f19a", "_from": "tar@latest" } diff --git a/deps/npm/node_modules/tar/test/extract-move.js b/deps/npm/node_modules/tar/test/extract-move.js new file mode 100644 index 0000000000..45400cd9bb --- /dev/null +++ b/deps/npm/node_modules/tar/test/extract-move.js @@ -0,0 +1,132 @@ +// Set the umask, so that it works the same everywhere. +process.umask(parseInt('22', 8)) + +var tap = require("tap") + , tar = require("../tar.js") + , fs = require("fs") + , gfs = require("graceful-fs") + , path = require("path") + , file = path.resolve(__dirname, "fixtures/dir.tar") + , target = path.resolve(__dirname, "tmp/extract-test") + , index = 0 + , fstream = require("fstream") + , rimraf = require("rimraf") + , mkdirp = require("mkdirp") + + , ee = 0 + , expectEntries = [ + { + "path" : "dir/", + "mode" : "750", + "type" : "5", + "depth" : undefined, + "size" : 0, + "linkpath" : "", + "nlink" : undefined, + "dev" : undefined, + "ino" : undefined + }, + { + "path" : "dir/sub/", + "mode" : "750", + "type" : "5", + "depth" : undefined, + "size" : 0, + "linkpath" : "", + "nlink" : undefined, + "dev" : undefined, + "ino" : undefined + } ] + +function slow (fs, method, t1, t2) { + var orig = fs[method] + if (!orig) return null + fs[method] = function () { + var args = [].slice.call(arguments) + console.error("slow", method, args[0]) + var cb = args.pop() + + setTimeout(function () { + orig.apply(fs, args.concat(function(er, data) { + setTimeout(function() { + cb(er, data) + }, t2) + })) + }, t1) + } +} + +// Make sure we get the graceful-fs that fstream is using. +var gfs2 +try { + gfs2 = require("fstream/node_modules/graceful-fs") +} catch (er) {} + +var slowMethods = ["chown", "chmod", "utimes", "lutimes"] +slowMethods.forEach(function (method) { + var t1 = 500 + var t2 = 0 + slow(fs, method, t1, t2) + slow(gfs, method, t1, t2) + if (gfs2) { + slow(gfs2, method, t1, t2) + } +}) + + + +// The extract class basically just pipes the input +// to a Reader, and then to a fstream.DirWriter + +// So, this is as much a test of fstream.Reader and fstream.Writer +// as it is of tar.Extract, but it sort of makes sense. + +tap.test("preclean", function (t) { + rimraf.sync(target) + /mkdirp.sync(target) + t.pass("cleaned!") + t.end() +}) + +tap.test("extract test", function (t) { + var extract = tar.Extract(target) + var inp = fs.createReadStream(file) + + // give it a weird buffer size to try to break in odd places + inp.bufferSize = 1234 + + inp.pipe(extract) + + extract.on("end", function () { + rimraf.sync(target) + + t.equal(ee, expectEntries.length, "should see "+ee+" entries") + + // should get no more entries after end + extract.removeAllListeners("entry") + extract.on("entry", function (e) { + t.fail("Should not get entries after end!") + }) + + t.end() + }) + + + extract.on("entry", function (entry) { + var found = + { path: entry.path + , mode: entry.props.mode.toString(8) + , type: entry.props.type + , depth: entry.props.depth + , size: entry.props.size + , linkpath: entry.props.linkpath + , nlink: entry.props.nlink + , dev: entry.props.dev + , ino: entry.props.ino + } + + var wanted = expectEntries[ee ++] + + t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path) + }) +}) diff --git a/deps/npm/node_modules/tar/test/fixtures.tgz b/deps/npm/node_modules/tar/test/fixtures.tgz index 4501bcf226..f1676023af 100644 Binary files a/deps/npm/node_modules/tar/test/fixtures.tgz and b/deps/npm/node_modules/tar/test/fixtures.tgz differ diff --git a/deps/npm/node_modules/tar/test/pack-no-proprietary.js b/deps/npm/node_modules/tar/test/pack-no-proprietary.js index 5bf0e540f8..d4b03a1fe9 100644 --- a/deps/npm/node_modules/tar/test/pack-no-proprietary.js +++ b/deps/npm/node_modules/tar/test/pack-no-proprietary.js @@ -149,6 +149,38 @@ var tap = require("tap") devmin: 0, fill: '' } ] + , [ 'entry', + { path: 'fixtures/dir/', + mode: 488, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/dir/sub/', + mode: 488, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + , [ 'entry', { path: 'fixtures/foo.js', mode: 420, @@ -823,7 +855,7 @@ function runTest (t, doGH) { t.equal(ev, wanted[0], "event type should be "+wanted[0]) if (ev !== wanted[0] || e.path !== wanted[1].path) { - console.error(wanted) + console.error("wanted", wanted) console.error([ev, e.props]) e.on("end", function () { console.error(e.fields) diff --git a/deps/npm/node_modules/tar/test/pack.js b/deps/npm/node_modules/tar/test/pack.js index 0f50994587..bf033c1298 100644 --- a/deps/npm/node_modules/tar/test/pack.js +++ b/deps/npm/node_modules/tar/test/pack.js @@ -177,6 +177,39 @@ var tap = require("tap") devmin: 0, fill: '' } ] + , [ 'entry', + { path: 'fixtures/dir/', + mode: 488, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', + { path: 'fixtures/dir/sub/', + mode: 488, + uid: uid, + gid: gid, + size: 0, + type: '5', + linkpath: '', + ustar: 'ustar\u0000', + ustarver: '00', + uname: '', + gname: '', + devmaj: 0, + devmin: 0, + fill: '' } ] + + , [ 'entry', { path: 'fixtures/foo.js', mode: 420, @@ -868,11 +901,15 @@ function runTest (t, doGH) { } t.equal(ev, wanted[0], "event type should be "+wanted[0]) - // if (ev !== wanted[0] || e.path !== wanted[1].path) { - // console.error(wanted) - // console.error([ev, e.props]) - // throw "break" - // } + if (ev !== wanted[0] || e.path !== wanted[1].path) { + console.error("wanted", wanted) + console.error([ev, e.props]) + e.on("end", function () { + console.error(e.fields) + throw "break" + }) + } + t.has(e.props, wanted[1], "properties "+wanted[1].path) if (wanted[2]) { diff --git a/deps/npm/package.json b/deps/npm/package.json index aad92d45ab..a2961a3606 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "1.4.23", + "version": "1.4.28", "name": "npm", "description": "A package manager for node", "keywords": [ @@ -41,19 +41,19 @@ "child-process-close": "~0.1.1", "chmodr": "~0.1.0", "chownr": "0", - "cmd-shim": "~1.1.2", - "columnify": "~1.1.0", + "cmd-shim": "2.0.0", + "columnify": "~1.2.1", "editor": "~0.1.0", - "fstream": "~1.0.0", + "fstream": "~1.0.2", "fstream-npm": "~1.0.0", - "github-url-from-git": "~1.3.0", - "github-url-from-username-repo": "~0.2.0", + "github-url-from-git": "~1.4.0", + "github-url-from-username-repo": "~1.0.0", "glob": "~4.0.5", "graceful-fs": "~3.0.0", "inflight": "~1.0.1", "ini": "~1.2.0", "init-package-json": "~1.0.0", - "lockfile": "~0.4.0", + "lockfile": "~1.0.0", "lru-cache": "~2.5.0", "minimatch": "~1.0.0", "mkdirp": "~0.5.0", @@ -61,9 +61,9 @@ "nopt": "~3.0.1", "npm-cache-filename": "~1.0.1", "npm-install-checks": "~1.0.2", - "npm-registry-client": "~2.0.4", + "npm-registry-client": "~2.0.7", "npm-user-validate": "~0.1.0", - "npmconf": "~1.1.4", + "npmconf": "~1.1.8", "npmlog": "~0.1.1", "once": "~1.3.0", "opener": "~1.3.0", @@ -71,15 +71,15 @@ "path-is-inside": "~1.0.0", "read": "~1.0.4", "read-installed": "~2.0.5", - "read-package-json": "~1.2.6", - "request": "~2.30.0", + "read-package-json": "~1.2.7", + "request": "~2.42.0", "retry": "~0.6.0", "rimraf": "~2.2.8", "semver": "~2.3.0", "sha": "~1.2.1", - "slide": "~1.1.5", + "slide": "~1.1.6", "sorted-object": "~1.0.0", - "tar": "~1.0.0", + "tar": "~1.0.1", "text-table": "~0.2.0", "uid-number": "0.0.5", "which": "1" diff --git a/deps/npm/scripts/doc-build.sh b/deps/npm/scripts/doc-build.sh index 18f4e6ca86..9afab0782b 100755 --- a/deps/npm/scripts/doc-build.sh +++ b/deps/npm/scripts/doc-build.sh @@ -70,9 +70,9 @@ case $dest in *.[1357]) ./node_modules/.bin/ronn --roff $src \ | sed "s|@VERSION@|$version|g" \ - | perl -pi -e 's/(npm\\-)?([^\(]*)\(1\)/npm help \2/g' \ - | perl -pi -e 's/(npm\\-)?([^\(]*)\([57]\)/npm help \3 \2/g' \ - | perl -pi -e 's/(npm\\-)?([^\(]*)\(3\)/npm apihelp \2/g' \ + | perl -pi -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(1\)/npm help \2/g' \ + | perl -pi -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(([57])\)/npm help \3 \2/g' \ + | perl -pi -e 's/(npm\\-)?([a-zA-Z\\\.\-]*)\(3\)/npm apihelp \2/g' \ | perl -pi -e 's/npm\(1\)/npm help npm/g' \ | perl -pi -e 's/npm\(3\)/npm apihelp npm/g' \ > $dest diff --git a/deps/npm/scripts/index-build.js b/deps/npm/scripts/index-build.js index 8031fe7277..21297cc93e 100755 --- a/deps/npm/scripts/index-build.js +++ b/deps/npm/scripts/index-build.js @@ -35,15 +35,16 @@ function output (files) { "==============================================\n") writeLines(files, 0) - writeLines(files, 1, "Command Line Documentation") - writeLines(files, 3, "API Documentation") - writeLines(files, 5, "Files") - writeLines(files, 7, "Misc") + writeLines(files, 1, "Command Line Documentation", "Using npm on the command line") + writeLines(files, 3, "API Documentation", "Using npm in your Node programs") + writeLines(files, 5, "Files", "File system structures npm uses") + writeLines(files, 7, "Misc", "Various other bits and bobs") } -function writeLines (files, sxn, heading) { - if (heading) - console.log("# %s\n", heading) +function writeLines (files, sxn, heading, desc) { + if (heading) { + console.log("## %s\n\n%s\n", heading, desc) + } files.filter(function (f) { return f[0] === sxn }).forEach(writeLine) @@ -57,6 +58,6 @@ function writeLine (sd) { var content = fs.readFileSync(doc, "utf8").split("\n")[0].split("-- ")[1] - console.log("## %s(%d)\n", d, sxn) + console.log("### %s(%d)\n", d, sxn) console.log(content + "\n") } diff --git a/deps/npm/scripts/publish-tag.js b/deps/npm/scripts/publish-tag.js new file mode 100644 index 0000000000..046ec98881 --- /dev/null +++ b/deps/npm/scripts/publish-tag.js @@ -0,0 +1,3 @@ +var semver = require("semver") +var version = semver.parse(require("../package.json").version) +console.log('v%s.%s-next', version.major, version.minor) diff --git a/deps/npm/test/tap/ignore-install-link.js b/deps/npm/test/tap/ignore-install-link.js index 2262213754..2c90b9a6d4 100644 --- a/deps/npm/test/tap/ignore-install-link.js +++ b/deps/npm/test/tap/ignore-install-link.js @@ -1,122 +1,72 @@ -var common = require('../common-tap.js') -var test = require('tap').test -var osenv = require('osenv') +if (process.platform === "win32") { + console.log("ok - symlinks are weird on windows, skip this test") + return +} +var common = require("../common-tap.js") +var test = require("tap").test var npm = require.resolve("../../bin/npm-cli.js") var node = process.execPath -var path = require('path') -var fs = require('fs') -var rimraf = require('rimraf') -var mkdirp = require('mkdirp') -var pkg = path.resolve(__dirname, 'ignore-install-link') -var spawn = require('child_process').spawn -var linkDir = path.resolve(osenv.tmpdir(), 'npm-link-issue') - -test('ignore-install-link: ignore install if a package is linked', function(t) { - setup(function(err) { - if (err) { - t.ifError(err) - t.end() - return - } - - var p = path.resolve(pkg, 'node_modules', 'npm-link-issue') - fs.lstat(p, function(err, s) { - t.ifError(err) +var path = require("path") +var fs = require("fs") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var spawn = require("child_process").spawn + +var root = path.resolve(__dirname, "ignore-install-link") +var pkg = path.resolve(root, "pkg") +var dep = path.resolve(root, "dep") +var target = path.resolve(pkg, "node_modules", "dep") +var cache = path.resolve(root, "cache") +var global = path.resolve(root, "global") + +var pkgj = { "name":"pkg", "version": "1.2.3" + , "dependencies": { "dep": "1.2.3" } } +var depj = { "name": "dep", "version": "1.2.3" } + +var myreg = require("http").createServer(function (q, s) { + s.statusCode = 403 + s.end(JSON.stringify({"error":"forbidden"}) + "\n") +}).listen(common.port) + +test("setup", function (t) { + rimraf.sync(root) + mkdirp.sync(root) + mkdirp.sync(path.resolve(pkg, "node_modules")) + mkdirp.sync(dep) + mkdirp.sync(cache) + mkdirp.sync(global) + fs.writeFileSync(path.resolve(pkg, "package.json"), JSON.stringify(pkgj)) + fs.writeFileSync(path.resolve(dep, "package.json"), JSON.stringify(depj)) + fs.symlinkSync(dep, target, "dir") + t.end() +}) - t.ok(true === s.isSymbolicLink(), 'child is a symlink') - t.end() - }) +test("ignore install if package is linked", function (t) { + common.npm(["install"], { + cwd: pkg, + env: { + PATH: process.env.PATH || process.env.Path, + HOME: process.env.HOME, + npm_config_prefix: global, + npm_config_cache: cache, + npm_config_registry: common.registry, + npm_config_loglevel: "silent" + }, + stdio: "inherit" + }, function (er, code, stdout, stderr) { + if (er) throw er + t.equal(code, 0) + t.end() }) }) -test('cleanup', function(t) { - process.chdir(osenv.tmpdir()) - rimraf.sync(pkg) - rimraf.sync(linkDir) +test("still a symlink", function (t) { + t.equal(true, fs.lstatSync(target).isSymbolicLink()) t.end() }) - -function setup(cb) { - rimraf.sync(linkDir) - mkdirp.sync(pkg) - mkdirp.sync(path.resolve(pkg, 'cache')) - mkdirp.sync(path.resolve(pkg, 'node_modules')) - mkdirp.sync(linkDir) - fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ - author: 'Evan Lucas', - name: 'ignore-install-link', - version: '0.0.0', - description: 'Test for ignoring install when a package has been linked', - dependencies: { - 'npm-link-issue': 'git+https://github.com/lancefisher/npm-link-issue.git#0.0.1' - } - }), 'utf8') - fs.writeFileSync(path.resolve(linkDir, 'package.json'), JSON.stringify({ - author: 'lancefisher', - name: 'npm-link-issue', - version: '0.0.1', - description: 'Sample Dependency' - }), 'utf8') - - clone(cb) -} - -function clone (cb) { - var child = createChild(process.cwd(), 'git', ['--git-dir', linkDir, 'init']) - child.on('close', function(c) { - if (c !== 0) - return cb(new Error('Failed to init the git repository')) - - process.chdir(linkDir) - performLink(cb) - }) -} - -function performLink (cb) { - var child = createChild(linkDir, node, [npm, 'link', '.']) - child.on('close', function(c) { - if (c !== 0) - return cb(new Error('Failed to link ' + linkDir + ' globally')) - - performLink2(cb) - }) -} - -function performLink2 (cb) { - var child = createChild(pkg, node, [npm, 'link', 'npm-link-issue']) - child.on('close', function(c) { - if (c !== 0) - return cb(new Error('Failed to link ' + linkDir + ' to local node_modules')) - - performInstall(cb) - }) -} - -function performInstall (cb) { - var child = createChild(pkg, node, [npm, 'install']) - child.on('close', function(c) { - if (c !== 0) - return cb(new Error('Failed to install')) - - cb() - }) -} - -function createChild (cwd, cmd, args) { - var env = { - HOME: process.env.HOME, - Path: process.env.PATH, - PATH: process.env.PATH, - npm_config_loglevel: "silent" - } - - if (process.platform === "win32") - env.npm_config_cache = "%APPDATA%\\npm-cache" - - return spawn(cmd, args, { - cwd: cwd, - stdio: "pipe", - env: env - }) -} +test("cleanup", function (t) { + rimraf.sync(root) + myreg.close() + t.end() +}) diff --git a/deps/npm/test/tap/spawn-enoent.js b/deps/npm/test/tap/spawn-enoent.js new file mode 100644 index 0000000000..7ea9dab560 --- /dev/null +++ b/deps/npm/test/tap/spawn-enoent.js @@ -0,0 +1,40 @@ +var path = require("path") +var test = require("tap").test +var fs = require("fs") +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var common = require("../common-tap.js") + +var pkg = path.resolve(__dirname, "spawn-enoent") +var pj = JSON.stringify({ + name:"x", + version: "1.2.3", + scripts: { start: "wharble-garble-blorst" } +}, null, 2) + "\n" + + +test("setup", function (t) { + rimraf.sync(pkg) + mkdirp.sync(pkg) + fs.writeFileSync(pkg + "/package.json", pj) + t.end() +}) + +test("enoent script", function (t) { + common.npm(["start"], { + cwd: pkg, + env: { + PATH: process.env.PATH, + Path: process.env.Path, + npm_config_loglevel: "warn" + } + }, function (er, code, sout, serr) { + t.similar(serr, /npm ERR! Failed at the x@1\.2\.3 start script\./) + t.end() + }) +}) + +test("clean", function (t) { + rimraf.sync(pkg) + t.end() +}) diff --git a/deps/npm/test/tap/startstop.js b/deps/npm/test/tap/startstop.js index 4ac8fd0000..f056aa7892 100644 --- a/deps/npm/test/tap/startstop.js +++ b/deps/npm/test/tap/startstop.js @@ -18,7 +18,7 @@ function testOutput (t, command, er, code, stdout, stderr) { if (stderr) throw new Error('npm ' + command + ' stderr: ' + stderr.toString()) - stdout = stdout.trim().split('\n') + stdout = stdout.trim().split(/\n|\r/) stdout = stdout[stdout.length - 1] t.equal(stdout, command) t.end() diff --git a/deps/npm/test/tap/startstop/package.json b/deps/npm/test/tap/startstop/package.json index 3be0cf3752..08a6547ebb 100644 --- a/deps/npm/test/tap/startstop/package.json +++ b/deps/npm/test/tap/startstop/package.json @@ -1,7 +1,7 @@ {"name":"startstop" ,"version":"1.2.3" ,"scripts":{ - "start":"node -e 'console.log(\"start\")'", - "stop":"node -e 'console.log(\"stop\")'" + "start":"node -e \"console.log('start')\"", + "stop":"node -e \"console.log('stop')\"" } } diff --git a/deps/npm/test/tap/unpack-foreign-tarball.js b/deps/npm/test/tap/unpack-foreign-tarball.js new file mode 100644 index 0000000000..a03f9b17f4 --- /dev/null +++ b/deps/npm/test/tap/unpack-foreign-tarball.js @@ -0,0 +1,84 @@ +var test = require("tap").test +var rimraf = require("rimraf") +var mkdirp = require("mkdirp") +var common = require("../common-tap.js") +var path = require("path") +var fs = require("fs") +var dir = path.resolve(__dirname, "unpack-foreign-tarball") +var root = path.resolve(dir, "root") +var nm = path.resolve(root, "node_modules") +var cache = path.resolve(dir, "cache") +var tmp = path.resolve(dir, "tmp") +var pkg = path.resolve(nm, "npm-test-gitignore") + +var env = { + npm_config_cache: cache, + npm_config_tmp: tmp +} + +var conf = { + env: env, + cwd: root, + stdio: [ "pipe", "pipe", 2 ] +} + +test("npmignore only", function (t) { + setup() + var file = path.resolve(dir, "npmignore.tgz") + common.npm(["install", file], conf, function (code, stdout, stderr) { + verify(t, code, ["foo"]) + }) +}) + +test("gitignore only", function (t) { + setup() + var file = path.resolve(dir, "gitignore.tgz") + common.npm(["install", file], conf, function (code, stdout, stderr) { + verify(t, code, ["foo"]) + }) +}) + +test("gitignore and npmignore", function (t) { + setup() + var file = path.resolve(dir, "gitignore-and-npmignore.tgz") + common.npm(["install", file], conf, function (code, stdout, stderr) { + verify(t, code, ["foo", "bar"]) + }) +}) + +test("gitignore and npmignore, not gzipped", function (t) { + setup() + var file = path.resolve(dir, "gitignore-and-npmignore.tar") + common.npm(["install", file], conf, function (code, stdout, stderr) { + verify(t, code, ["foo", "bar"]) + }) +}) + +test("clean", function (t) { + clean() + t.end() +}) + +function verify (t, code, files) { + if (code) { + t.fail("exited with failure: " + code) + return t.end() + } + var actual = fs.readdirSync(pkg).sort() + var expect = files.concat([".npmignore", "package.json"]).sort() + t.same(actual, expect) + t.end() +} + +function setup () { + clean() + mkdirp.sync(nm) + mkdirp.sync(cache) + mkdirp.sync(tmp) +} + +function clean () { + rimraf.sync(root) + rimraf.sync(cache) + rimraf.sync(tmp) +} diff --git a/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tar b/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tar new file mode 100644 index 0000000000..8b638b114a Binary files /dev/null and b/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tar differ diff --git a/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tgz b/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tgz new file mode 100644 index 0000000000..4be4364104 Binary files /dev/null and b/deps/npm/test/tap/unpack-foreign-tarball/gitignore-and-npmignore.tgz differ diff --git a/deps/npm/test/tap/unpack-foreign-tarball/gitignore.tgz b/deps/npm/test/tap/unpack-foreign-tarball/gitignore.tgz new file mode 100644 index 0000000000..7f5f2d71bf Binary files /dev/null and b/deps/npm/test/tap/unpack-foreign-tarball/gitignore.tgz differ diff --git a/deps/npm/test/tap/unpack-foreign-tarball/npmignore.tgz b/deps/npm/test/tap/unpack-foreign-tarball/npmignore.tgz new file mode 100644 index 0000000000..765593decb Binary files /dev/null and b/deps/npm/test/tap/unpack-foreign-tarball/npmignore.tgz differ